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 

Continuous WinClose

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
david.kingham



Joined: 06 Nov 2007
Posts: 24

PostPosted: Mon Nov 02, 2009 9:30 pm    Post subject: Continuous WinClose Reply with quote

I'm having trouble making the IfWinExist/WinClose work continuously, it hits the return and sticks because there is no subroutine to return to, probably really stupid and simple but how do I get around this? Thanks!

Code:
#SingleInstance force
#NoTrayIcon
SetTitleMatchMode RegEx
Hotkey IfWinActive, Autodesk| Revit Architecture|Structure|MEP 2008|2009|2010 .*
Hotkey ^f, SEARCH
Hotkey ^F1, WTF
Hotkey ^k, KeynoteManager
IfWinExist Visual Studio Tools for Application Disabled
   WinClose
IfWinExist Journal Error
   WinClose
IfWinExist Copied Central File
   WinClose
IfWinExist Linked File Cannot Be Saved
   WinClose
Return
SEARCH:
Run Find Q:\Revit\Content\Neenan Library
Return
WTF:
IfNotExist %A_MyDocuments%\Revit Launcher\Revit_Architecture_UI_Mapping_Tool.chm
   FileCopy \\nevada\drawings\Revit\Files\2010\Architecture\Revit_Architecture_UI_Mapping_Tool.chm, %A_MyDocuments%\Revit Launcher, 1
Run %A_MyDocuments%\Revit Launcher\Revit_Architecture_UI_Mapping_Tool.chm
Return
KeynoteManager:
FileCopy \\nevada\drawings\revit\install\other\Keynote manager\keynote manager.exe, %A_MyDocuments%\Revit Launcher, 1
FileCopy \\nevada\drawings\revit\install\other\Keynote manager\masters.txt, %APPDATA%\Keynote Manager, 1
Run %A_MyDocuments%\Revit Launcher\Keynote Manager.exe
Return
Back to top
View user's profile Send private message
Leef_me



Joined: 08 Apr 2009
Posts: 5336
Location: San Diego, California

PostPosted: Mon Nov 02, 2009 11:15 pm    Post subject: Reply with quote

Quote:
it hits the return and sticks because there is no subroutine to return to
No, the script executes the return, and that part of the script is done.
see here: http://www.autohotkey.com/docs/Scripts.htm#auto

A timer could be used to repeat the desired instructions at some interval.
(untested) I suggest, after this line in your script
Code:
Hotkey ^k, KeynoteManager

Insert these lines
Code:
settimer, kill_windows, 1000 ; 1000ms = 1 second.
return

kill_windows:
Back to top
View user's profile Send private message
david.kingham



Joined: 06 Nov 2007
Posts: 24

PostPosted: Tue Nov 03, 2009 8:33 pm    Post subject: Reply with quote

Thank you, that worked perfectly.
Back to top
View user's profile Send private message
Display posts from previous:   
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