AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

start/stop button help needed...

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
ZARDOZ
Guest





PostPosted: Wed Apr 20, 2005 10:37 pm    Post subject: start/stop button help needed... Reply with quote

Code:
Gui, Show, x722 y387 h70 w100, UPDATER!
; Gui, +AlwaysOnTop  +Disabled -SysMenu
Gui, Font, S10 cRed Bold, Verdana
Gui, Color, 000000
Gui, -Border
Gui, Add, Button, x15 y10 w72 h20, Start
Gui, Add, Button, x15 y36 w72 h20, Stop
Gui, Add, Button, x15 y62 w72 h20, Close
return

ButtonStart:
gui, submit, nohide
{
   Loop
      {
         send, ^r!
         sleep, 1
         send, {enter}
         sleep, 7000
      }
   return
}

ButtonStop:
gui, submit, nohide
{
Pause
}
return

ButtonClose:
gui, submit, nohide
{
ExitApp
}
return

the Startbutton only work once.. if i press stop it doesnt work to press start again.. have to restart it..

"To pause or resume the entire script at the press of a key, assign a hotkey to the Pause command as in this example:
^!p::Pause ; Press Ctrl+Alt+P to pause. Press it again to resume."
but it doesnt work to press the stop either..
what am i doing wrong??

thanks
/newbie Very Happy
Back to top
ZARDOZ
Guest





PostPosted: Wed Apr 20, 2005 10:48 pm    Post subject: Reply with quote

hmm.. didnt notice it before but it starts the loop when i start the script..
dont have to press the startbutton.. how do i make it not do that?
so the startbutton, and stop works without restart..

thanks again
Back to top
Invalid User



Joined: 14 Feb 2005
Posts: 442
Location: Texas, Usa

PostPosted: Wed Apr 20, 2005 11:11 pm    Post subject: Reply with quote

Code:
 
; Gui, +AlwaysOnTop  +Disabled -SysMenu
Gui, Font, S10 cRed Bold, Verdana
Gui, Color, 000000
Gui, -Border
Gui, Add, Button, x15 y10 w72 h20, Start
Gui, Add, Button, x15 y36 w72 h20, Stop
Gui, Add, Button, x15 y62 w72 h20, Close
Gui, Show, x722 y387 h70 w100, UPDATER!
return

ButtonStart:
Loop
{
   send, ^r!
   sleep, 1
   send, {enter}
   sleep, 7000
}
return

ButtonStop:
Pause
return

GuiClose:
ButtonClose:
ExitApp

Pause::Pause, Toggle


This is untested. I dont think the button to stop will work to Unpause it, Instead I have added a hotkey. Use the pause button to pause and unpause the script.
_________________
my lame sig Smile
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
ZARDOZ
Guest





PostPosted: Wed Apr 20, 2005 11:49 pm    Post subject: Reply with quote

wanted a start and stop button for it but i cant figure it out hahah : )
i did it like this instead:
Code:
Gui, Show, x722 y387 h90 w160, UPDATER! :)
Gui, +AlwaysOnTop  +Disabled -SysMenu
Gui, Font, S10 cRed Bold, Verdana
Gui, Color, 000000
Gui, -Border
Gui, Add, Text,, Högerklicka i`nBrowserfönstret för`natt Starta/Pausa`nUppdateringen...`n¯¯¯¯¯¯¯¯¯¯¯¯
Gui, Add, Button, x45 y80 w72 h20, Stäng

#NoTrayIcon

PAUSE

   Loop
   {
      send, ^r!
      sleep, 1
      send, {enter}
      sleep, 7000
   }
   return

Rbutton::PAUSE

ButtonStäng:
gui, submit, nohide
{
   ExitApp
}
return

just to rightclick to start/pause the loop now.. and only have a close button in the gui... works, and looks better then to have buttons that dont work haha : )
thank you anyways
Back to top
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group