nicoshot Posted August 29, 2011 Share Posted August 29, 2011 i made a small script: HotKeySet("{ESC}", "Terminate") HotKeySet("{q}", "_start") While 1 Sleep("50") WEnd Func Terminate() Exit 0 EndFunc Func _start() While 1 MouseMove( 38, 554) Sleep("20000") WEnd EndFunc this is kind of a test. im learning. one problem. this basic and easy script doesnt move or click (when i use mouseclick) while im on a application. am i using the wrong command? like it works on my desktop but when i switch to a program it stops working. Link to comment Share on other sites More sharing options...
rac1 Posted August 29, 2011 Share Posted August 29, 2011 (edited) Global $Paused HotKeySet("{ESC}", "Terminate") HotKeySet("{q}", "_start") While 1 Sleep("50") WEnd Func Terminate() Exit 0 EndFunc Func _start() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"',0,0) MouseMove( 38, 554) Sleep("20000") WEnd ToolTip("") EndFunc Omg i haven't read your topic very well ,, sorry, me to have same problem, and opened a topic, it requires always top on autoit or you need to use dll that the window uses it. Edited August 29, 2011 by rac1 Link to comment Share on other sites More sharing options...
rcmaehl Posted August 29, 2011 Share Posted August 29, 2011 (edited) This may not be the most optimized script but: #Include <Misc.au3> Global $Toggle While 1 Select Case _IsPressed("1b") Exit 0 Case _IsPressed("51") or $Toggle $Toggle = True MouseMove( 38, 554) Sleep(20000) Case Else ;;; EndSelect WEnd EDIT: You can also use ControlSend. See docs under Function Reference -> Window Management -> Controls Edited August 29, 2011 by rcmaehl My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated.My Projects WhyNotWin11Cisco Finesse, Github, IRC UDF, WindowEx UDF Link to comment Share on other sites More sharing options...
nicoshot Posted August 29, 2011 Author Share Posted August 29, 2011 This may not be the most optimized script but: #Include <Misc.au3> Global $Toggle While 1 Select Case _IsPressed("1b") Exit 0 Case _IsPressed("51") or $Toggle $Toggle = True MouseMove( 38, 554) Sleep(20000) Case Else ;;; EndSelect WEnd sry im quite new at this... have no idea what you wrote... and if that is what i need where do i add that? Link to comment Share on other sites More sharing options...
rcmaehl Posted August 29, 2011 Share Posted August 29, 2011 That's the entire script. Also, for clicking in programs you can try sending it virtually to the program (see my edit remark from last post) My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated.My Projects WhyNotWin11Cisco Finesse, Github, IRC UDF, WindowEx UDF Link to comment Share on other sites More sharing options...
nicoshot Posted August 29, 2011 Author Share Posted August 29, 2011 how can i add a hotkey to it? Link to comment Share on other sites More sharing options...
rcmaehl Posted August 29, 2011 Share Posted August 29, 2011 how can i add a hotkey to it?You don't have to, the script checks for if q is pressed, if it is then the loop within the loop, so to speak, starts. My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated.My Projects WhyNotWin11Cisco Finesse, Github, IRC UDF, WindowEx UDF Link to comment Share on other sites More sharing options...
rac1 Posted August 29, 2011 Share Posted August 29, 2011 You don't have to, the script checks for if q is pressed, if it is then the loop within the loop, so to speak, starts.for example i want to use f12 key, how can i find the code of f12 key? like yours 1b=q Link to comment Share on other sites More sharing options...
somdcomputerguy Posted August 29, 2011 Share Posted August 29, 2011 Actually, 1b is the ESC key. q is 51._IsPressed - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Link to comment Share on other sites More sharing options...
nicoshot Posted August 29, 2011 Author Share Posted August 29, 2011 it still doesnt work..... while the aplication is up mousemove or mouseclick doesnt work..... Link to comment Share on other sites More sharing options...
rcmaehl Posted August 30, 2011 Share Posted August 30, 2011 it still doesnt work..... while the aplication is up mousemove or mouseclick doesnt work..... Then try ControlSend() My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated.My Projects WhyNotWin11Cisco Finesse, Github, IRC UDF, WindowEx UDF Link to comment Share on other sites More sharing options...
nicoshot Posted August 30, 2011 Author Share Posted August 30, 2011 still doesnt, doesnt seem to have any control. i heard about using dlls or infiltrating the application.... any easier way? Link to comment Share on other sites More sharing options...
rcmaehl Posted August 31, 2011 Share Posted August 31, 2011 Which program are you trying to send mouse movements too, if I may ask? My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated.My Projects WhyNotWin11Cisco Finesse, Github, IRC UDF, WindowEx UDF Link to comment Share on other sites More sharing options...
gononono64 Posted August 31, 2011 Share Posted August 31, 2011 A thing you need to know is that some programs will not allow you to automate things... mostly games but there are some applications that will not allow you to do this. The work around this is extremely complicated. Too much so for someone as new as you. Keep practicing and one day youll use c, c++ etc. and youll figure it out XD Link to comment Share on other sites More sharing options...
rcmaehl Posted August 31, 2011 Share Posted August 31, 2011 A thing you need to know is that some programs will not allow you to automate things... mostly games but there are some applications that will not allow you to do this. The work around this is extremely complicated. Too much so for someone as new as you. Keep practicing and one day youll use c, c++ etc. and youll figure it out XD 1. True, not all programs allow automation, That's why I'm asking2. The varying work arounds ares easily done as I've done them myself many times with AutoIt3. It's our responsibility to teach new people the ropes and the not-so-ropes My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated.My Projects WhyNotWin11Cisco Finesse, Github, IRC UDF, WindowEx UDF Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now