Hyflex Posted September 25, 2006 Share Posted September 25, 2006 My script works but i want it so when i press start again on the GUI it to pause the script because currently when i press start and then press it again it does nothing and the Close part doesnt work..... Link to comment Share on other sites More sharing options...
Valuater Posted September 25, 2006 Share Posted September 25, 2006 see "hotKeySet"... in help, at the bottom is a GREAT example for pause 8) Link to comment Share on other sites More sharing options...
Hyflex Posted September 25, 2006 Author Share Posted September 25, 2006 Yah but i dont see how to add it in as a pause for the button??? Also how do i get labels like: $Label3 = GUICtrlCreateLabel("http://www.autoitscript.com/forum/index.php?showtopic=33376", 16, 232, 353, 17, $WS_GROUP) as hyperlinks??? Link to comment Share on other sites More sharing options...
Hyflex Posted September 25, 2006 Author Share Posted September 25, 2006 I tryed: http://www.autoitscript.com/autoit3/docs/f...s/HotKeySet.htmBut i get the following error.http://img114.imageshack.us/img114/8673/testerch2.jpg Link to comment Share on other sites More sharing options...
jvanegmond Posted September 25, 2006 Share Posted September 25, 2006 Put Global $paused at the top of your script. :Z github.com/jvanegmond Link to comment Share on other sites More sharing options...
Hyflex Posted September 25, 2006 Author Share Posted September 25, 2006 Put Global $paused at the top of your script. :Z i did... Link to comment Share on other sites More sharing options...
jvanegmond Posted September 25, 2006 Share Posted September 25, 2006 (edited) Then you didn't put it on top before all the other code. Put it on LINE 1! And make sure you save the file before you run etc. Edited September 25, 2006 by Manadar github.com/jvanegmond Link to comment Share on other sites More sharing options...
Hyflex Posted September 25, 2006 Author Share Posted September 25, 2006 nop i didnt but just did then, all it does is when i press start it pauses. and then doesnt do anything.... Link to comment Share on other sites More sharing options...
jvanegmond Posted September 25, 2006 Share Posted September 25, 2006 Probably because at that point it is paused. github.com/jvanegmond Link to comment Share on other sites More sharing options...
Hyflex Posted September 25, 2006 Author Share Posted September 25, 2006 But it doesnst unpause.............. Link to comment Share on other sites More sharing options...
The Kandie Man Posted September 25, 2006 Share Posted September 25, 2006 Yah but i dont see how to add it in as a pause for the button??? Also how do i get labels like: $Label3 = GUICtrlCreateLabel("http://www.autoitscript.com/forum/index.php?showtopic=33376", 16, 232, 353, 17, $WS_GROUP) as hyperlinks???Try adding this to your GUI while loop: $i_linklabel = GUICtrlCreateLabel("http://www.autoitscript.com/forum/index.php?showtopic=33376", 16, 232, 353, 17, $WS_GROUP) GUICtrlSetColor($i_linklabel , 0x0000FF) Select Case $msg = $i_linklabel Run(@ComSpec & " /c " & '@start http://www.autoitscript.com/forum/index.php?showtopic=33376', "", @SW_HIDE) EndSelect "So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire Link to comment Share on other sites More sharing options...
Hyflex Posted September 26, 2006 Author Share Posted September 26, 2006 Case $msg =$i_linklabel Case ^ ERROR Error: Variable Used without being declared Link to comment Share on other sites More sharing options...
Hyflex Posted September 27, 2006 Author Share Posted September 27, 2006 bump.... can ya help. Link to comment Share on other sites More sharing options...
Hyflex Posted September 27, 2006 Author Share Posted September 27, 2006 ... doesnt work... WHy doesnt it stop the script when i tell it to... Also can someone help me so if pixelserch finds black in a certain location for it to pause all functions Link to comment Share on other sites More sharing options...
AceLoc Posted September 27, 2006 Share Posted September 27, 2006 HotKeySet("{DEL}", "_Pause") ;any script here. Func _Pause() While 1 Sleep(100) WEnd EndFunc [quote name='AceLoc']I gots new sunglasses there cool.[/quote] Link to comment Share on other sites More sharing options...
i542 Posted September 27, 2006 Share Posted September 27, 2006 Try adding this to your GUI while loop: $i_linklabel = GUICtrlCreateLabel("http://www.autoitscript.com/forum/index.php?showtopic=33376", 16, 232, 353, 17, $WS_GROUP) GUICtrlSetColor($i_linklabel , 0x0000FF) Select Case $msg = $i_linklabel Run(@ComSpec & " /c " & '@start [url="http://www.autoitscript.com/forum/index.php?showtopic=33376"]http://www.autoitscript.com/forum/index.php?showtopic=33376'[/url], "", @SW_HIDE) EndSelect oÝ÷ Ûú®¢×"ØbL¨¹ú+myÛ(ëax/z¼¢+¶¶§µ«¢+Ø((¥¹±Õ±ÐíÕ¥ ½¹ÍѹÑ̹ÔÌÐì()Õ¥ ÉÑ ÅÕ½Ðí5äU$1°¡åÁɱ¥¹¬ÅÕ½Ðì¤((ÀÌØí¥}±¥¹±°ôU% Ñɱ ÉÑ1° ÅÕ½Ðí¡ÑÑÀè¼½ÝÝܹÕѽ¥ÑÍÉ¥Áй½´½½ÉÕ´½¥¹à¹Á¡ÀýÍ¡½ÝѽÁ¥ôÌÌÌÜØÅÕ½Ðì°ÄØ°ÈÌÈ°ÌÔÌ°ÄÜ°ÀÌØí]M}I=U@¤)U% ÑɱMÑ ½±½È ÀÌØí¥}±¥¹±°°ÁàÀÀÀÁ¤()Õ¥MÑMÑÑ ¤()]¡¥±Ä((ÀÌØíµÍôÕ¥Ñ5Í ¤)M±Ð( ÍÀÌØíµÍôÀÌØí¥}±¥¹±°(IÕ¸¡ ½µMÁµÀìÅÕ½Ðì½ÅÕ½ÐìµÀìÌäíÍÑÉÐmÕÉ°ôÅÕ½Ðí¡ÑÑÀè¼½ÝÝܹÕѽ¥ÑÍÉ¥Áй½´½½ÉÕ´½¥¹à¹Á¡ÀýÍ¡½ÝѽÁ¥ôÌÌÌÜØÅÕ½Ðíu¡ÑÑÀè¼½ÝÝܹÕѽ¥ÑÍÉ¥Áй½´½½ÉÕ´½¥¹à¹Á¡ÀýÍ¡½ÝѽÁ¥ôÌÌÌÜØÌäíl½Õɱt°ÅÕ½ÐìÅÕ½Ðì°M]}!%¤(( ÍÀÌØíµÍôÀÌØíU%}Y9Q} 1=M((á¥Ñ±½½À)¹M±Ð()]¹oÝ÷ Ø:²+azZl=«¬y«¢+Ø!½Ñ-åMÐ ÅÕ½ÐíèÅÕ½Ðì°ÅÕ½Ðí}ÁÕÍÅÕ½Ðì¤()¡½ÑåÍÐ ÅÕ½ÐíàÅÕ½Ðì°ÅÕ½Ðí}Õ¹ÁÕÍÅÕ½Ðì¤()!½Ñ-åMÐ ÅÕ½ÐíÅÕ½Ðì°ÅÕ½Ðí}á¥ÐÅÕ½Ðì¤((íå½ÕÈÍÉ¥Áн̡É()Õ¹}ÁÕÍ ¤()±¥¹± ÅÕ½Ðí}ÁÕÍÅÕ½Ðì¤()M±À ÈÔÀ¤()¹Õ¹()Õ¹}Õ¹ÁÕÍ ¤()±¥¥Í± ¤()¹Õ¹((í¹áÐÕ½¹±ä½ÈÑÍÐÁÕÉÁ½ÍÌ()Õ¹}á¥Ð ¤()á¥Ð()¹Õ¹ Not tested. i542 I can do signature me. Link to comment Share on other sites More sharing options...
Hyflex Posted September 27, 2006 Author Share Posted September 27, 2006 i542 thats very interesting... but i want the close/exit/pause to work with my scripts/gui WHen i click a script on the .exe i want to be able to click it again and for it to stop and then i can change to another one. Also i wana be able to press close whenever and it to actually close. Also u seem good with autoit. How do i get it so when pixelsearch find black in an area for it to pause the script...? Cos i dun know whos script does that Link to comment Share on other sites More sharing options...
Hyflex Posted September 27, 2006 Author Share Posted September 27, 2006 Tryed ur method of the URl but doesnt work... also i dont get how to incoperate ur pause witht he starts of scripts.... Link to comment Share on other sites More sharing options...
sshrum Posted September 27, 2006 Share Posted September 27, 2006 (edited) WHen i click a script on the .exe i want to be able to click it again and for it to stop and then i can change to another one. Also i wana be able to press close whenever and it to actually close. Let me get this straight: you want to launch a exe...have it run...if and when the exe is launched again...have the first app pause...then when it is launched again...restart the original all while have just the one exe running. Either I'm close or way off base... If I'm right (?), I'd say monitor for a trigger file (or reg entry...your call) that you can have your app write if it sees that it is already running. If ProcessList(@ScriptName) > 2 Then if fileexists($sYourPausefilename) then ; delete the pause file here else ; write the pause file here endif Then in a while loop, test for the presence of the pause file and do a sleep(). For cleanup, have the app delete the pause file (or regentry) when the app closes (or you can do it on startup if processcount = 1). If I'm way off, disregard my ramblings :-p Edited September 27, 2006 by sshrum Sean Shrum :: http://www.shrum.net All my published AU3-based apps and utilities 'Make it idiot-proof, and someone will make a better idiot' Link to comment Share on other sites More sharing options...
jvanegmond Posted September 27, 2006 Share Posted September 27, 2006 It sounds like all you want is Event mode! Opt("OnEventMode, 1) Look at the helpfile for more example. github.com/jvanegmond 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