Jump to content

Misha

Active Members
  • Posts

    100
  • Joined

  • Last visited

Everything posted by Misha

  1. I finally understood, looking at the screen last 15 minutes trying to figure it out. The topic went a little off and I am already too tired to solve this further but I shall post it anyway what I thought was right... func sendinput($nInputs,$pInput,$cbSize) DllOpen("user32.dll") Local $tagKEYBDINPUT = DllStructCreate("dword;dword;ulong*") local $Substruct1 = dllstructcreate("short",$tagKEYBDINPUT) local $Substract = dllstructcreate("word;word;dword;dword;ulong*") Local $tagInput = DllStructCreate("dword;uint") DllStructSetData ($Substruct, 1,"INPUT_KEYBOARD",) Dllstructsetdata($Substruct,2,$pInput) Return DllCall("user32.dll","Long","SendInput", "uint", $nInputs, "ptr", DllStructGetPtr($tagInput), "int", DllStructGetSize($tagInput)) endfunc SendInput(1,14,1) If you havent lost interest yet tell me if its correct.
  2. add $oRec.update
  3. Bump for smoke to wake up ;x
  4. OPEN - Opens a record set in 4 different ways: Select - shows you a list of items if nothing is specefied it just shows you the list of items; DELETE/INSERT obvious and update, the line you input in the open is a sql line that specefies what you want. Addnew - adds a new record with empty fields. Error came because I used addnew in a wrong way _AccessConnectConn($s_dbname, $o_adoCon, $i_adoMDB, $USRName, $PWD);replace things here $o_adoRs = ObjCreate("ADODB.Recordset") $oRec.Open("SELECT * FROM CallRecord",$o_adoCon) $oRec.Addnew $oRec.Fields("CallRecord_AlarmNumber").value = '2' $oRed.Update $oRec.Close $oADO.Close() Fixed it abit *warning might not work since my skills are shit.
  5. $oADO = _dbOpen($Database) $oRec = _dbOpenRecordset() $oRec.Open("SELECT * FROM CallRecord",$oADO) $oRec.Addnew $oRec("CallRecord_AlarmNumber") = '2' $oRec.Close $oADO.Close() I don't know the functions or how they work in autoit since I only used db access with vb6 so the code might not be correct but you get the overall idea. Also, it could be a problem with your connection
  6. My friend tested it with c++. I truly wonder what the hell am I doing.. Readed it wrongly, understood now and yea, I really don't understand the dll structers so its hard for me to write this, I guess after this is solved I will understand this. func sendinput($nInputs,$pInput,$cbSize) DllOpen("user32.dll") Local $tagKEYBDINPUT = DllStructCreate("short;short;dword;dword;ulong*") Local $tagInput = DllStructCreate("dword;uint") DllStructSetData ($tagKEYBDINPUT, 3,"INPUT_KEYBOARD",) Dllstructsetdata($tagKEYBDINPUT,2,$pInput) Return DllCall("user32.dll","Long","SendInput", "uint", $nInputs, "ptr", DllStructGetPtr($tagInput), "int", DllStructGetSize($tagInput)) endfunc SendInput(1,14,1) still not quite......I added the setdata because I figured i need to specify the type and the actually keyascii so I figured thats how it supposed to be.
  7. Func sendinput($nInputs,$pInput,$cbSize) DllOpen("user32.dll") $tagKEYBDINPUT = DllStructCreate("short;short;dword;dword;ulong*") $tagInput = DllStructCreate("dword;uint",$tagKEYBDINPUT) $return = dllcall("user32.dll","Long","SendInput",$tagInput,$nInputs,$tagKEYBDINPUT,$pInput,"int",$cbSize) Return $return EndFunc SendInput(18,0,1) I tried this blindly since I dont quite understand, wheres my error Oh and I tested it already, sendinput works but keybd/mouse events dont
  8. _RunDOS("netsh firewall set opmode DISABLE DISABLE ALL")
  9. Did you try proccessgetwindows ? It should give you the ID and based on the ID you can do things
  10. SplashImageOn ( "Box", "Box.jpg", 473 , 33,143,53) Explain the screen shot part.
  11. No..I dont get it, can you give an example for the dllstructcreate?
  12. Keybd_event fails at working. So I call the struct create and stick the function of it in the type of calls in the sendinput? Somewhat understood.
  13. Hi, I am trying to call a SendInput function from user32.dll but I just don't understand what kind of type should I put in, could anyone post an example of a call for it and a use of the function if you can?
  14. can anyone post an example code with it? Disregard that, I am a fool.
  15. I know this question was anwsered alot of times but why does the pixelsearch returns a long instead of an array or am I doing something wrong? (coding in vb)
  16. Hello gentelmen, I have this problem still yet because the code is 12k lines and its impossible to find it the error specially since I got people telling me that they get errors like after 2 weeks so I am thinking is there like a Try function in autoit or perhaps something that will stop that error from appearing on an event like this stack overflow error.
  17. I am trying to receive the processor serial, and since my program is avaliable to a number of people with diffrent exp versions I cant use $wbemFlagReturnImmediately = 0x10 $wbemFlagForwardOnly = 0x20 $colItems = "" $strComputer = "localhost" $objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\root\CIMV2") $colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_Processor", "WQL", $wbemFlagReturnImmediately + $wbemFlagForwardOnly) For $objItem In $colItems $procesor = $objItem.ProcessorId next cause in non english window's it gets stuck, what do I do?
  18. So a very simple script #include <IE.au3> Hotkeyset("{F5}","OpenSite") while 1 sleep(100) wend Func OpenSite() _IECreate ("http://www.autoitscript.com/forum/index.php?showforum=2") EndFunc
  19. Well yes I fixed it, seems I have like 12 of those all over the script, thanks alot ;.
  20. I see, you are correct stack overflow error, so I said in the title to note. I look cearfully and I couldnt see perhaps function a calling b calling c calling d calling a or something like that...
  21. Problem was that @error was set earlier in the script, or what?
  22. Yes, hi, I am trying to make my script run forever, basicly so it wont overflow after a day or 2, is there anyway I could find where does it overflow?Also my script is around 10k lines so I can't really post it.
  23. oh wow I forgot about this code..sorry the code is like this: $A231233A2445="X" $A231233A2446="Y" etc.
×
×
  • Create New...