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 

Run, properties ??

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
Rubberduck



Joined: 24 Apr 2005
Posts: 96

PostPosted: Tue May 17, 2005 11:15 am    Post subject: Run, properties ?? Reply with quote

What I want, showing the properties-Window of this file,
wait until I close it, THEN exit the script

Code:
Run, properties C:\AHK-Test.txt
; I assume the file exists !!!
SetTitleMatchmode, 2
winwaitclose, AHK-Test
exitapp

Properties flashes shortly, script exits and Windows-Error occurs

Code:
Run, properties C:\AHK-Test.txt
; I assume the file exists !!!
winwaitclose, Eigenschaften von AHK-Test.txt
;english Windows would show (I assume) "properties of AHK-Test.txt"

property-Window flashes shortly, closes and Windows-Error occurs

Code:
Run, properties C:\AHK-Test.txt
; I assume the file exists !!!
SetTitleMatchMode, 2         
winwaitclose, AHK-Test

same as above

Maybe I did a silly mistake (this often happens), but I don't get it to work
I experimented with
- Runwait, properties C:\AHK-Test.txt
- #persistent (at top of script) and ExitApp (at end of script)
- testet with WinwaitClose, ahk_class #(number show by Window-Spy)
- sometimes (i don't remember the code but It was when using #persistent)
I got the properties-window on screen. but if I closed it, the script stayed active
(in trayarea), also I added an exitApp at the end of a script. Shouldn't a sript exit
(also using #persistent) when exitapp is called ?

I thought what can be wrong.
Maybe the properties-Window is loosing (or never getting) focus
so it closes.

The property-window does close when the windows-explorer is open. and is getting focus.

No matter what I did (and I testet a lot), I don't get it working.
I am using WinXP-Home german
-Version
(SP2, always updated with Windows-Update).

Edit: I was not sure if I should post it here (if it is a bug)
or post it in the Support/Help-Section (if I am simply silly)
_________________
Wer keine Antworten hat muss nicht dumm sein,
dumm ist nur der welcher keine Fragen hat.
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10480

PostPosted: Tue May 17, 2005 12:23 pm    Post subject: Reply with quote

I'm surprised you get a "Windows error". Even in debug mode, the script doesn't generate any errors for me.

To solve this issue, try adding a WinWait after the Run command. This gives the window time to appear before the script starts waiting for it to disappear:

Run, properties "%A_ScriptFullPath%"
WinWait %A_ScriptName% Properties
WinWaitClose
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Bug Reports 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