AutoHotkey Community

It is currently May 26th, 2012, 5:57 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: June 13th, 2005, 9:17 am 
Offline

Joined: November 3rd, 2004, 11:24 am
Posts: 51
Probably, it is very rare and unimportant bug, but I simply would like to understand, why it so occurs.
There is any difference between start of scripts from the Windows Explorer and from the Quick Launch panel (and in general from any Taskbars panel)
This effect can be noticed by means of program Rocket Launcher (http://home.cogeco.ca/%7Eraduking/RKLauncher_03Beta.zip - download, simply unpack in a time folder and start Launcher). Now, if we shall start any script (or the shortcut to a script, or compilled script) from the Quick Launch panel, we shall see as is minimized "phantom Main Window of AutoHotkey". It does not occur if to start a script with any another way, for example from the Windows Explorer. However, scripts, are compilled with old versions of AutoHotkey (a minimum till February, 7th 2005) have this unpleasant effect too.

It is not fatal, but it does not allow to start scripts from Taskbars panels with installed Rocket Launcher.


Report this post
Top
 Profile  
Reply with quote  
PostPosted: June 13th, 2005, 12:04 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
Landvermesser wrote:
...difference between start of scripts from the Windows Explorer and from the Quick Launch panel (and in general from any Taskbars panel)
I could not reproduce this. I added both a script and a comiled script to the Quick Launch toolbar (in the task bar) and ran them both without the main window appearing minimimized (as a taskbar button).

When a script launches, internally it does the following:
ShowWindow(g_hWnd, SW_HIDE);
ShowWindow(g_hWnd, SW_HIDE);

The first HIDE might not take effect if the program that launched the script specified that the window should be maximized, minimized etc. That's why there's a second line: it should force the main window to be hidden on startup.

Quote:
However, scripts, are compilled with old versions of AutoHotkey (a minimum till February, 7th 2005) have this unpleasant effect too.
Can you clarify how old versions behave differently than new ones?

This is starting to sound like a specific trait of your system. If anyone else experiences this issue, please post here.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 14th, 2005, 9:50 am 
Offline

Joined: November 3rd, 2004, 11:24 am
Posts: 51
No, it is a little not so. I shall start an empty script (without commands, only template) from the Quick Launch Panel and I receive an icon in the RKLaunchers Task Panel. On System Taskbar there is nothing, as well as should be.

See: http://www.oyla2.de/userdaten/07396955/ ... shot01.jpg (450 Kb, sorry)

I see all process so: At working RKLauncher we do not minimize a window of programs, but we hide them. The window remains on the screen, but as invisible. It is built in feature of RKLauncher. RKLauncher constantly observes of programs which do basic window HIDDEN. It allows RKLauncher to place the so "minimized" windows in the his Task Panel. Simultaneously it hides windows from OS, these windows are not visible any more in System Taskbar and not visible in "ALT-TAB window". When the script will start, shows (possibly, for short time) Main Window of AutoHotkey and then it is done HIDDEN. RKLauncher notices it, captures the area of the screen with which just was Main Window, and places the reduced copy of this area together with an icon of a script in the his Task Panel. The script continues to work normally. But in panel of RKLauncher the icon of a script is visible. If we click this icon, Scripts Main Window becomes visible again (UNHIDDEN) and than it should be closed with help of the titles button " Close Window ".

This effect I see not only on my both PC, but other users too; see: http://www.aqua-soft.org/board/showthre ... age=5pp=40 message #185

The similar effect turns out if to start a script from Windows Start Menu or reload skript from System Tray.

If to start a compilled script (version 1.0.25.0) from Windows Explorer, we too shall receive the phantom in Taskpanel of RKLauncher. However the compilled script of version 1.0.31.1 works normally at start from Windows Explorer; we receive phantoms in RKLauncher only at start from Quick Launch Panel and Start Panel of Windows.

This effect can be probable bypassed, if to start a script not directly, but with help of other program written not in AutoHotkey language, or for example, with help of Batch file. I do not tested it.

Generally, this is a problem of RKLauncher, not of AutoHotkey, but RKLauncher is relative populair...


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 14th, 2005, 12:29 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
Thanks for the clarification.

Landvermesser wrote:
When the script will start, shows (possibly, for short time) Main Window of AutoHotkey and then it is done HIDDEN.
Generally, I don't think a script's main window should ever be visible unless the process that launched it somehow forces that. When the main window is created, it is initially in a hidden state. There is nothing in the program that ever shows the window except later, when the user double clicks the tray menu, etc.

Quote:
However the compilled script of version 1.0.31.1 works normally at start from Windows Explorer; we receive phantoms in RKLauncher only at start from Quick Launch Panel and Start Panel of Windows.
A change involving ShowWindow() was made somewhere between 1.0.31.01 and the present. But it is likely that the change can't be undone without breaking existing scripts that rely on the current behavior.

Quote:
This effect can be probable bypassed, if to start a script not directly, but with help of other program written not in AutoHotkey language, or for example, with help of Batch file.
Try changing the script's shortcut to start minimized rather than normal. Within "properties of shortcut", there is a DropDownList containing Normal/Minimized/Maximized. If it doesn't work, try making the shortcut directly to AutoHotkey.exe instead but keep the "minimized" attribute. For example, make its target be "C:\Program Files\AutoHotkey\AutoHotkey.exe" "C:\Scripts\My Script.ahk"

Quote:
Generally, this is a problem of RKLauncher, not of AutoHotkey, but RKLauncher is relative populair...
Hopefully the above will fix it because I don't yet see a way to fix it in the program.

Thanks for all the details.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 15th, 2005, 8:51 am 
Offline

Joined: November 3rd, 2004, 11:24 am
Posts: 51
It is very a pity to me, but nothing helps. I have found, that scripts will start without problems with help of "RUN dialog window". I think, that the problem is somehow connected with the internal maintenance of Windows shortcuts.

Thanks, Chris.

If I shall find the decision I shall inform here.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group