PartieHonteuse

Active Members
  • Content count

    9
  • Joined

  • Last visited


About PartieHonteuse

  • Rank
    Seeker

Contact Methods

  • Website URL http://sredniowiecze.zdrowo.info.pl

Profile Information

  • Gender Male

PartieHonteuse's Activity

  1. PartieHonteuse added a post in a topic: Auto3Lib   

    Hello everyone, I'm trying to test out the event viewer functions and I think I'm having some issues here...

    The code (part found from a previous reply in this topic) is as such:


    #include <A3LEventLog.au3> Global $hEventLog, $iI, $aEvent, $event_end, $file FileDelete("test.txt") $file = FileOpen("test.txt", 1) $hEventLog = _EventLog_Open ("", "System") $event_end = _EventLog_Count ($hEventLog) For $iI = 1 To $event_end $aEvent = _EventLog_Read ($hEventLog, True, False) FileWrite($file, "Result ............: " & $aEvent[ 0] & @CRLF) FileWrite($file, "Record number .....: " & $aEvent[ 1] & @CRLF) FileWrite($file, "Submitted .........: " & $aEvent[ 2] & " " & $aEvent[ 3] & @CRLF) FileWrite($file, "Generated .........: " & $aEvent[ 4] & " " & $aEvent[ 5] & @CRLF) FileWrite($file, "Event Type.........: " & $aEvent[ 7] & @CRLF) FileWrite($file, "Event ID ..........: " & $aEvent[ 6] & @CRLF) FileWrite($file, "Type ..............: " & $aEvent[ 8] & @CRLF) FileWrite($file, "Category ..........: " & $aEvent[ 9] & @CRLF) FileWrite($file, "Source ............: " & $aEvent[10] & @CRLF) FileWrite($file, "Computer ..........: " & $aEvent[11] & @CRLF) FileWrite($file, "Username ..........: " & $aEvent[12] & @CRLF) FileWrite($file, "Description .......: " & $aEvent[13] & @CRLF) FileWrite($file, "Event Error Text...: " & $aEvent[14] & @CRLF) FileWrite($file, @CRLF) Next _EventLog_Close ($hEventLog) FileClose($file)
    Here's an example of part of the output in the text file:


    The problem I have is the %%1223 text in the Description section. I'm not sure where it's getting that. Here's that same entry but taken directly from my event viewer....

    Notice the differences in both quotes after it says "The following error occurred:" . Out of 1,849 events in my System event log this %%nnnn thing happens roughly 250 times and %%nnnn is any of the following %%1223, %%126, %%121, or %%1053, depending on the event. Anyone able to give me some info or tell m what I'm doing wrong?
    Partie
  2. PartieHonteuse added a post in a topic: MySQL UDFs   

    I've been using (or trying to use) this UDF for a while now and am suddenly getting an error when trying other things than the examples listed on the first pages. I haven't seen any errors such as mine going through the 15 pages worth of posts. When going to the "tools" menu in scite and selecting "go" this is the message I receive in gold letters pretty much right after the inputbox
    "Error in my_thread_global_end(): 1 threads didn't exit" I looked that error up online and a lot of people mention a fix for libmysql.dll but the hosting provider is on a linux box so therefore no reason to have libmysql.dll and also they said to test the error to see if you fixed it is to create a phpinfo() script and run it and that same message should appear but when I do the phpinfo() i do not receive that error in the output.


    Here's my code to check to make sure I'm not doing something way wrong (which is very highly likely):


    #include <mysql.au3> $objErr = ObjEvent("AutoIt.Error","MyErrFunc") $sqldomain = "mydomain.com" $sqldb = "mydb" $sqluser = "username" $sqlpass = "password" $table_users = "db_users" $table_config = "db_config" $sqlcon = _MySQLConnect($sqluser,$sqlpass,$sqldb,$sqldomain) ;let's add a user to the DB. $user = InputBox("User", "Please enter the username to add.", "", "", _ -1, -1, 0, 0) Exit _Query($sqlcon, "INSERT into rfid_users (username) VALUE ('" & $user & "')") _MySQLEnd($sqlcon) Func MyErrFunc() $hexnum=hex($objErr.number,8) Msgbox(0,"","We intercepted a COM Error!!" & @CRLF & @CRLF & _ "err.description is: " & $objErr.description & @CRLF & _ "err.windescription is: " & $objErr.windescription & @CRLF & _ "err.lastdllerror is: " & $objErr.lastdllerror & @CRLF & _ "err.scriptline is: " & $objErr.scriptline & @CRLF & _ "err.number is: " & $hexnum & @CRLF & _ "err.source is: " & $objErr.source & @CRLF & _ "err.helpfile is: " & $objErr.helpfile & @CRLF & _ "err.helpcontext is: " & $objErr.helpcontext _ ) exit EndFunc
    Thanks in advance for any help or information.

    PartieHonteuse
  3. PartieHonteuse added a post in a topic: phidgets RFID help.   

    Ok, so after I went home and didn't have the Phidgets21.msi package installed I went and installed the newest version dated June 21st. I then ran my code as above and guess what, it didn't work! I was getting the same error as GordoMandoza. The com object was initialized but my MsgBox kept saying it's not attached. After posting to the phidgets website and not getting a response for a couple of days I did some more research. Apparently the open command is now asynchronous so I added a "sleep()" command after the $oPhidget.Open() so it gave it time to open the phidget rfid. The below code works. You can take out the 1st msgbox() and also the serial number in the $oPhidget.Open().


    Global $TagNum ;create the phidget rfid object $oPhidget = ObjCreate("phidget21COM.phidgetrfid") ;open the rfid $oPhidget.Open(18477) sleep(6000) ;check to make sure the rfid kit is attached to the system. MsgBox(0, "Test", $oPhidget.DeviceType()) If NOT $oPhidget.IsAttached Then ;if the interface kit is not attached then display a message box and exit MsgBOx(0, "Error", "The Phidget Interface Kit is not Attached! Please attach it and try again!") Exit EndIf $oPhidget.OutputState(3) = True;this turns ON the reader $oPhidget.OutputState(2) = False; this turns OFF the onboard LED $oPhidget.OutputState(1) = False; turns OFF the post LED $oPhidget.OutputState(0) = False; turns OFF the 5V lead $SinkObject=ObjEvent($oPhidget,"RFIDEvent_") func RFIDEvent_OnTag($tagnum) FileWrite(@ScriptDIr & "\output.txt", $tagnum & @CRLF) $oPhidget.OutputState(3) = FALSE If $tagnum = "08003332f7" Then With $oPhidget .OutPutState(2) = True .OutPutState(1) = True .Outputstate(0) = True EndWith Else With $oPhidget .OutputState(2) = False .OutputState(1) = False .OutputState(0) = False EndWith EndIf ;MsgBox(0, "On Tag", $tagnum) endfunc while 1 Sleep(5000) If not $oPhidget.Outputstate(3) = True Then $oPhidget.OutputState(3) = True EndIf WEnd
  4. PartieHonteuse added a post in a topic: phidgets RFID help.   

    I know this post is 3+ months old but I never got a message saying there was a new reply so to GordoMandoza I do apologize.

    I'm a beginner just as you are (or were from 3 months ago, yet I still am a beginner ). Either way, give this a shot..


    Global $TagNumber ;create the phidget rfid object $oPhidget = ObjCreate("phidget.phidgetrfid") ;open the rfid $oPhidget.Open(True) ;check to make sure the rfid kit is attached to the system. If NOT $oPhidget.IsAttached Then ;if the interface kit is not attached then display a message box and exit MsgBOx(0, "Error", "The Phidget Interface Kit is not Attached! Please attach it and try again!") Exit EndIf $oPhidget.OutputState(3) = True;this turns on the reader $oPhidget.OutputState(2) = False; this turns OFF the onboard LED $oPhidget.OutputState(1) = False; turns OFF the post LED $oPhidget.OutputState(0) = False; turns OFF the 5V lead $SinkObject=ObjEvent($oPhidget,"RFIDEvent_") func RFIDEvent_OnTag($tagnum) FileWrite(@ScriptDIr & "\output.txt", $tagnum & @LF) ;MsgBox(0, "On Tag", $tagnum) endfunc while 1 sleep(10000) wend
    This is initialize and turn on the rfid reader. Then, when you put a rfid tag over it, it should output the rfid tag number into a file where the script is saved named output.txt.

    I've just come back to this after a while so there is 1 problem that I haven't worked out yet. The rfid tag reader reads it so fast that you'll see multiple lines of the same tag number depending on how long you hold the rfid tag over the reader.

    I also have the phidget manager 2.1 installed from Feb 5 of 2007 and have no problems with the code above.

    Partie
  5. PartieHonteuse added a post in a topic: phidgets RFID help.   


    Err, sorry, didn't realize I forgot to mention that yes, your code worked a treat. Thank you very much for your help and explanations!

    Partie
  6. PartieHonteuse added a post in a topic: phidgets RFID help.   

    Thank you for the very quick response and sorry it took me a minute to get back to you.

    How do I know what an "event" is to use ObjEvent?

    And now that you gave me "ObjEvent($oPhidget,"RFIDEvent_")" any new "event" i want to use I create a new function for it and make sure to use the "RFIDEvent_" prefix for that event and it should work?

    $SinkObject=ObjEvent($oPhidget,"RFIDEvent_")


    func RFIDEvent_OnTag($TagNumber) MsgBox(0, "On Tag", $TagNumber) endfunc while 1 sleep(1000) wend
  7. PartieHonteuse added a post in a topic: phidgets RFID help.   

    Hello everyone,

    A couple of days ago my boss asked if I could do something for him using the phidgets (phidgetsusa.com) interface kit and make some generic "command line" program that would turn off the relays. Well, with browsing the web and all that stuff I made it work. It was rather exciting and now he's letting me play with the RFID reader but am completely stuck.

    All I really want to do is understand in Autoit how to convert


    Private Sub rfid_OnTag(ByVal TagNumber As String)
    Into something that autoit can use/read. I've done this so far..


    Global $TagNumber ;create the phidget rfid object $oPhidget = ObjCreate("phidget.phidgetrfid") ;open the rfid $oPhidget.Open(True) ;check to make sure the rfid kit is attached to the system. If NOT $oPhidget.IsAttached Then ;if the interface kit is not attached then display a message box and exit MsgBOx(0, "Error", "The Phidget Interface Kit is not Attached! Please attach it and try again!") Exit EndIf $oPhidget.OutputState(3) = True ;this turns on the reader $tagnum = $oPhidget.OnTag($TagNumber) MsgBox(0, "On Tag", $tagnum)oÝ÷ Ø'£­ßÛ&x¬ré^nëZR0j{m¡Ú"²Ú.׫²Ö§t.zË*ºUjV¬²Úâ ®¢Ö§v0¶®¢Ûkj{%jתºm«bÚºÚ"´â·lç²Æ«Ê«{l¶8À Ƨ¹©_¢»azbv­²êå
    Thanks in advance for reading and hopefully a helpful hand!

    Partie
  8. PartieHonteuse added a post in a topic: SSL Gmail with OpenSSL   

    Sorry if this isn't the correct place to post but I'm receiving errors with this.

    Here is the command trace output window -


    <RECV> CONNECTED(0000078C) --- Certificate chain 0 s:/C=US/ST=California/L=Mountain View/O=Google Inc/CN=smtp.gmail.com i:/C=ZA/ST=Western Cape/L=Cape Town/O=Thawte Consulting cc/OU=Certification Services Division/CN=Thawte Premium Server CA/emailAddress=premium-server@thawte.com --- Server certificate -----BEGIN CERTIFICATE----- MIIDVjCCAr+gAwIBAgIDP97OMA0GCSqGSIb3DQEBBAUAMIHOMQswCQYDVQQGEwJa QTEVMBMGA1UECBMMV2VzdGVybiBDYXBlMRIwEAYDVQQHEwlDYXBlIFRvd24xHTAb BgNVBAoTFFRoYXd0ZSBDb25zdWx0aW5nIGNjMSgwJgYDVQQLEx9DZXJ0aWZpY2F0 aW9uIFNlcnZpY2VzIERpdmlzaW9uMSEwHwYDVQQDExhUaGF3dGUgUHJlbWl1bSBT ZXJ2ZXIgQ0ExKDAmBgkqhkiG9w0BCQEWGXByZW1pdW0tc2VydmVyQHRoYXd0ZS5j b20wHhcNMDUwOTA1MDg1OTAyWhcNMDYwOTA1MDg1OTAyWjBoMQswCQYDVQQGEwJV UzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzET MBEGA1UEChMKR29vZ2xlIEluYzEXMBUGA1UEAxMOc210cC5nbWFpbC5jb20wgZ8w DQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMm+APV2IPBnnqOb5w15LPrpNaCfIDZm 3Z41dg/rmhs7szXCx5oWvW6idYerguXQuw1B0XWKbYLJ9Lbz/kX2k9NpyeNmz0J7 pLLBPoa0djthKfMQzgviWRmvad97JaFWFLxUGabISziA/0s3LB1VWMPX+IcxM0hs pSzdSzjkoI8LAgMBAAGjgaYwgaMwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUF BwMCMEAGA1UdHwQ5MDcwNaAzoDGGL2h0dHA6Ly9jcmwudGhhd3RlLmNvbS9UaGF3 dGVQcmVtaXVtU2VydmVyQ0EuY3JsMDIGCCsGAQUFBwEBBCYwJDAiBggrBgEFBQcw AYYWaHR0cDovL29jc3AudGhhd3RlLmNvbTAMBgNVHRMBAf8EAjAAMA0GCSqGSIb3 DQEBBAUAA4GBACvK1QfluQ26oqabKWaQUauwJQio6t/nRUmaN/cfB3EVeZihxELb +5a2aD/ljSUNLwEZb/OrG2eXGgnmwGrjERfLJurqYBXQuRwByAQ2lavucv4lgQmU Qumc3IhN67fNinoOoMa+/KZAYaoBPI8n6t/JR1/q30/rCZ64xKfnqYRf -----END CERTIFICATE----- subject=/C=US/ST=California/L=Mountain View/O=Google Inc/CN=smtp.gmail.com issuer=/C=ZA/ST=Western Cape/L=Cape Town/O=Thawte Consulting cc/OU=Certification Services Division/CN=Thawte Premium Server CA/emailAddress=premium-server@thawte.com --- No client certificate CA names sent --- SSL handshake has read 1012 bytes and written 338 bytes --- New, TLSv1/SSLv3, Cipher is DES-CBC3-SHA Server public key is 1024 bit Compression: NONE Expansion: NONE SSL-Session: Protocol : TLSv1 Cipher : DES-CBC3-SHA Session-ID: 046D2E39751EDBFF61C59797D4F7CA48C189283A3AF0550FBFF4F5F378F1B5D3 Session-ID-ctx: Master-Key: 44959A49D3F35ACBD80F0A08B63DB0F3B58426D2A8C5C67342CE7E5F3B56BEAF26F13C9F43A36D564642D51524729066 Key-Arg : None Start Time: 1142534738 Timeout : 300 (sec) Verify return code: 21 (unable to verify the first certificate) --- 220 mx.gmail.com ESMTP 10sm1784483nzo <SEND> ehlo OFFICE <RECV> 250-mx.gmail.com at your service 250-SIZE 20971520 250-8BITMIME 250-AUTH LOGIN PLAIN 250 ENHANCEDSTATUSCODES <SEND> AUTH LOGIN <RECV> 334 VXNlcm5hbWU6 <SEND> ZXNxdWliZWwubWlrZUBnbWFpbC5jb20= <RECV> 334 UGFzc3dvcmQ6 <SEND> ZnVjazEyMzQ= <RECV> 235 2.7.0 Accepted <SEND> MAIL FROM: <myemail@gmail.com> --- not what i originally used but you get the idea <RECV> 250 2.1.0 OK <SEND> RCPT TO: <myotheremail@domain.com> --- again, not what i originally used... <RECV> 250 2.1.5 OK <SEND> DATA <RECV> 354 Go ahead <SEND> From:User<myemail@gmail.com> To:<myotheremail@domain.com> Subject:UDF Test Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Testing the new email udf Second Line
    now the command trace window sort of "Freezes" at that part and then a popup displays...


    ERROR! Got This:0 Was looking for this:250 State:9
    Any help appreciated!

    Thanks,
    PartieHonteuse
  9. PartieHonteuse added a post in a topic: Few Questions from a newbie   

    Hi everyone!

    First, I'd like to say THANK YOU for creating AutoIt and also to everyone who contributes their knowledge and expertise to help people such as myself. It's rather difficult in most cases (in my opinion/past experiences) to get help from people that program and/or script without somehow being attached to their little click so a site/community such as this is just fantastic!

    I suppose now it's time for my question(s).

    I've been toying with Autoit now for a few months trying to learn different things but mostly a different scripting language rather than batch. Here's what I think I'm looking to do and am looking just for general direction.

    I've been creating an Autoit script that will run some XP CMD commands mostly dealing with the net shell (NETSH) but have found that the message boxes are rather annoying and have decided to try with the GUI. What I would like to know if it is rather simple to A.) Make a list of my DOS commands in a seperate file(i.e. store the commands in commands.txt) or in a separate function then B.) Have my gui loop through the file or function and perfom each command while C.) Displaying the output of the command from the Prompt to the GUI Window/Control adn also D.) putting that same output along with other stuff from the GUI to a logfile.

    If it helps, here's a better idea of what the script looked like in a batch file.


    ECHO This can take some time so please be patient ECHO -----NETSH SHOW HELPER----- >%mylog% netsh show helper >>%mylog% ECHO ----END NETSH SHOW HELPER---- >>%mylog% ECHO. >>%mylog% ECHO ----NETSH DIAG SHOW ALL---- >>%mylog% netsh diag show all >>%mylog% ECHO ----END NETSH DIAG SHOW ALL---- >>%mylog%
    With this GUI, I'd also like to add parameteres to it. For example if I compiled this script to say myprog.exe could I give it parameters that would make it run a certain function like C:\myprog.exe /function1 . Reason being is because during some of the commands that are used you have to restart the computer and instead of the whole thing running over again I'd like it to just pick up where it left off.

    If you think it would help to answer these questions with the original batch file that I've created please let me know and I'd be happy to attach it to a reply.

    I think that's about all for now and I'm sorry if this is too long of a post for being a first timer here. Any help would be much appreciated!

    Sincerely and Thankfully,

    PartieHonteuse

    Edit: It seems as though a better query for the search has lead me to answer my own Q (letter C). Located here if anyone else is interested http://www.autoitscript.com/forum/index.ph...topic=19161&hl=