
sd333221
Active Members-
Posts
88 -
Joined
-
Last visited
sd333221's Achievements

Wayfarer (2/7)
0
Reputation
-
I love you
-
Hi guys, i planned to redesign my program, to give error if the X coodinate (vertical) changes more than 30, after the function is called this is how far i got: Func roflcopter() $mpos = MouseGetPos ( ) while 1 $finalpos = $mpos $finalpos[0] = $finalpos[0] + 30 if $mpos[0] = $finalpos[0] Then MSGBOX(0, "Alert", "MOUSE MOVED TOO FAR!") EndIf sleep(100) WEnd return(1) Sleep(2000) EndFunc it doesn't even seem to work... Any ideas for this? Thank you mates!
-
Somehow, Blockinput doesn't work for interrupting a key if it's already pressed... Here is a example: #include <string.au3> #include <Misc.au3> HotKeySet("{SPACE}", "Input") HotKeySet("{ESC}", "ESC") While 1 Sleep(100) WEnd Func Input() HotKeySet('{SPACE}') ;DISABLE HOTKEY Send('{SPACE}') ;SEND SPACE KEY Sleep(500) ;FOR 500MS blockinput( 1 ) ;BLOCK ALL INPUTS, SPACEBAR CAN'T BE TRIGGERED NOW Sleep(1000) If _IsPressed('20') Then ;IF SPACEBAR IS STILL PRESSED!!! MsgBox(0, 'Damn', 'Tony is right, the Spacebar is still pressed, but you can' & "'" & 't control it....!', 5) ;THEN GIVE ERROR EndIf blockinput(0) ;UNBLOCK NOW... HotKeySet('{SPACE}', 'Input') ;RE-ENABLE THE FUNCTION EndFunc Func ESC() EXIT EndFunc I want to interrupt the Spacebar (if it's being held down) after 500ms for 1000ms, but while the input is blocked, the Spacebar is still pressed (check exemple, the msgbox triggers) Any solutions to get _IsPressed to NULL? Thank you (It keeps the key Pressed... i just need _IsPressed('20') becoming FALSE)
-
I am going crazy with the most easy script :)
sd333221 replied to sd333221's topic in AutoIt General Help and Support
It interrupts Space for 1 secound, do you know a better solution to block a single key? If yes, let me know -
I am going crazy with the most easy script :)
sd333221 replied to sd333221's topic in AutoIt General Help and Support
HotKeySet("{SPACE}", "Input") HotKeySet("{ESC}", "ESC") ;;;; Body of program would go here ;;;; While 1 Sleep(100) WEnd ;;;;;;;; Func Input() HotKeySet("{SPACE}") Send("{SPACE}") HotKeySet("{SPACE}","Input") Sleep( 1500 ) blockinput( 1 ) Sleep( 2000 ) blockinput( 0 ) EndFunc Func ESC() EXIT EndFunc oÝ÷ Ù8b²+'¢Ü(®H§«"·l²êi¢Ç¶h"×+jÈ^vl¢jnµêç£pÇ·ß}÷ß}÷ß}÷ß}È*.Á©çjIèÃrr©W¢µ©Ýµë-bjxhÔ©iǧ£§v+p¢¹,nëbµÚ²}ý¶²Ú)¥çZ~׫×q8^~éܶ*'ÆÞxjY^vh¥*'²íg¬ü¨ºËh¦Þ²È§+ZÜ×è¯],yËayÊ&¦ë^úÞ{7¬jwb·l~Þ½êç¢Ö¬f§jx®zH"-¢yr«-¡·jY^vÜzì¢g)à¢Ø^¯Ó¨¢l¶§*.Jj$z+l)ºÆ¢vl®åzl°Ú-jëh×6Func Input() HotKeySet("{SPACE}") Send("{SPACE}") HotKeySet("{SPACE}","Input") Sleep( 1500 ) blockinput( 1 ) Sleep( 2000 ) blockinput( 0 ) EndFuncoÝ÷ Ù¬jëh×6 Func Input() HotKeySet("{SPACE}") Send("{SPACE}") Sleep( 1500 ) blockinput( 1 ) Sleep( 2000 ) blockinput( 0 ) HotKeySet("{SPACE}","Input") EndFunc Was a missunderstanding, thousands thanks go to you, guys -
I want my script, if "{SPACE}" gets pressed, to do nothing (Sleep(1500)), and after 1.5sec to interrupt it for 1 Sec, by "BlockInput(1)"... Then it can go on... So i need the Space-Key to be still sended and to be interrupted for 1 sec after 1.5 sec... Also i need multi-call protection (i get recursion overflow sometimes) My problem is, that if i do it like its in the bottom, the {Space} Key wont be sent... also if i do Send( "{Space}" ) but i dont want to send Space i want the key to be hold down.. not only to send it I hope you can help me, thank you so much HotKeySet("{SPACE}", "Input") ;;;; Body of program would go here ;;;; While 1 Sleep(100) WEnd ;;;;;;;; Func Input() ;Send( "{SPACE}" ) <- this aint gonna work lol...... Sleep( 1500 ) blockinput( 1 ) Sleep( 1000 ) blockinput( 0 ) EndFunc
-
You could use an autoit screensaver http://www.autoitscript.com/forum/index.ph...;hl=screensaver
-
While 1 If WinExists("WebScanX") Then WinKill("WebScanX", "") If WinExists("Screensaver") Then WinKill("Screensaver", "") sleep(10) Wend
-
Hi guyz, i need your competent help one more time I made a remote script, using some things in the scripts 'n 'scraps section. It contains a server on wich i can execute a command, and a client which executes the command, here it is: ;Client: Global $MainSocket Local $MaxLength = 512; Maximum Length Of Text Local $Port = 50911; Port Number Local $Server = @IPAddress1; Server IpAddress TCPStartup() $MainSocket = TCPConnect($Server, $Port) ;TCPSend($MainSocket, "~newuser") While 1 $Data = TCPRecv($MainSocket, $MaxLength) If $Data = "~bye" Then Sleep(1) Exit ElseIf $Data <> "" Then ; If A command (something unconditional) is recieved $parameter = $data Run( "syn.exe " & $parameter , "/") ; <- Run the Programm Sleep(15000) ; <- For 15 secounds ProcessClose( "syn.exe") EndIf WEnd Func OnAutoItExit() If $MainSocket <> - 1 Then TCPSend($MainSocket, "~bye") TCPCloseSocket($MainSocket) EndIf TCPShutdown() EndFunc;==>OnAutoItExit ;Server: HotKeySet("{F5}", "SendCommand") ;<- The Command Function Global Const $Port = 50911 Global $MaxConc = 100 Global $MainSocket = TCPStartServer($Port, $MaxConc) If @Error <> 0 Then Exit MsgBox(16, "Error", "Server unable to initialize.") Global Const $MaxLength = 512 Global $ConnectedSocket[$MaxConc] Global $CurrentSocket = 0 Local $Track = 0 Global Const $MaxConnection = ($MaxConc - 1) For $Track = 0 To $MaxConnection Step 1 $ConnectedSocket[$Track] = -1 Next While 1 $ConnectedSocket[$CurrentSocket] = TCPAccept($MainSocket) If $ConnectedSocket[$CurrentSocket] <> -1 Then $CurrentSocket = SocketSearch() EndIf $Track = 0 For $Track = 0 To $MaxConnection Step 1 If $ConnectedSocket[$Track] <> - 1 Then $Data = TCPRecv($ConnectedSocket[$Track], $MaxLength) If $Data = "~bye" Then TCPCloseSocket($ConnectedSocket[$Track]) $ConnectedSocket[$Track] = -1 $CurrentSocket = SocketSearch() ElseIf $Data <> "" Then TCPSendMessageAll($MaxConnection, $Data) EndIf EndIf Next WEnd Func TCPSendMessageAll($ConnectionLimit, $Data) Local $Track = 0 For $Track = 0 To $ConnectionLimit Step 1 If $ConnectedSocket[$Track] <> - 1 Then TCPSend($ConnectedSocket[$Track], $Data) Next EndFunc ;==>TCPSendMessageAll Func TCPStartServer($Port, $MaxConnect = 1) Local $Socket $Socket = TCPStartup() Select Case $Socket = 0 SetError(@Error) Return -1 EndSelect $Socket = TCPListen(@IpAddress1, $Port, $MaxConnect) Select Case $Socket = -1 SetError(@Error) Return 0 EndSelect SetError(0) Return $Socket EndFunc Func SocketSearch() Local $Track = 0 For $Track = 0 To $MaxConnection Step 1 If $ConnectedSocket[$Track] = -1 Then Return $Track Else ; Socket In Use EndIf Next EndFunc ;==>SocketSearch Func SendCommand() ;<- The function which send the command TCPSendMessageAll("", "Test Run!") Return EndFunc My Problem is: The script works so far, if i press f5 on the server, the client executes the programm, but it only works once, if i press f5 a secound time the program doesent execute a secound time... Also i would need something to show how many users are connected. Thank you for your help!
-
what $dll do i have to use? i want to edit the memory of my .exe file not an dll!
-
#include <Array.au3> $Name = "Diablo II.exe" $Adress1 = "01DACECF" $Data = "C605B16ADB0101" $Size= "7" Memwrite($Name, $Adress1, $Data, $Size) $Adress1 = "01DACED6" $Data = "909090" $Size= "3" Memwrite($Name, $Adress1, $Data, $Size) $Adress1 = "028ECED3" $Data = "909090909090" $Size= "6" Memwrite($Name, $Adress1, $Data, $Size) $Adress1 = "028ECEC9" $Data = "C605B16A8F0201" $Size= "7" Memwrite($Name, $Adress1, $Data, $Size) $Adress1 = "028ECECF" $Data = "90909090909090909090" $Size= "10" Memwrite($Name, $Adress1, $Data, $Size) $Adress1 = "0185C465" $Data = "C605F955860101" $Size= "7" Memwrite($Name, $Adress1, $Data, $Size) $Adress1 = "0185C46C" $Data = "909090909090909090" $ize= "9" Memwrite($Name, $Adress1, $Data, $Size) $Adress1 = "01801DB0" $Data = "456E636820426F74" $Size= "8" Memwrite($Name, $Adress1, $Data, $Size) $Adress1 = "01802954" Memwrite($Name, $Adress1, $Data, $Size) $Adress1 = "01802A24" Memwrite($Name, $Adress1, $Data, $Size) $Adress1 = "01802B04" Memwrite($Name, $Adress1, $Data, $Size) $Adress1 = "01802B40" Memwrite($Name, $Adress1, $Data, $Size) $Adress1 = "01802C18" Memwrite($Name, $Adress1, $Data, $Size) $Adress1 = "01802D37" Memwrite($Name, $Adress1, $Data, $Size) Func MemWrite($ProcessName, $Address, $DataToWrite, $DataSize) Local $PID, $Result $PID = ProcessExists($ProcessName) $Result = DllCall(@Windowsdir & "\system32\"&$dll&".dll", "long", "WriteMemLoc", "long", $PID, "long", $Address, "long", $DataToWrite, "long", $DataSize) Return $Result[0] EndFunc same error, the MemWrite function is corrupted i think
-
this is w0uters mem function Func _MemWrite($ah_Mem, $i_Address, $v_Inject) Local $av_Call = DllCall($ah_Mem[0], 'int', 'WriteProcessMemory', 'int', $ah_Mem[1], 'int', $i_Address, 'ptr', DllStructGetPtr($v_Inject), 'int', DllStructGetSize($v_Inject), 'int', '') Return $av_Call[0] EndFunc ;==>_MemWrite but i dont know how to use the parameters :;( could you make an example with: file: Winesweeper.exe adress: 0185C465 bytes: C605F955860101 size: 7 just to explain?
-
Script Doesn't stay open long enough to use!
sd333221 replied to NELyon's topic in AutoIt General Help and Support
because without a loop, it only checks 1 time if the hotkey is pressed and if not,the program is finished and it shuts down. the loop holds the program running and waiting for the hotkey to be pressed -
Script Doesn't stay open long enough to use!
sd333221 replied to NELyon's topic in AutoIt General Help and Support
please remember that a sleep(1) could cause a 100% cpu usage very fast. Take sleep(300) -
thank you, i try this now