Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

hidden windows


  • Please log in to reply
2 replies to this topic
sfazekas
  • Members
  • 1 posts
  • Last active: Mar 30 2004 12:03 AM
  • Joined: 29 Mar 2004
I used autoscriptwriter II to install a program.
Then used the convert to convert it to an exe.

I have one question:

Is there any way to hide the window(s) when the exe or the aut file is ran ? i.e Do a silent install.

I tried the run hide option but it is still visable when installing

Here is my script

Run, C:\\Documents and Settings\\sfazekas\\My Documents\\PopUpStopperFree.exe
WinWait, Welcome, Welcome to Pop-Up St
IfWinNotActive, Welcome, Welcome to Pop-Up St, WinActivate, Welcome, Welcome to Pop-Up St
WinWaitActive, Welcome, Welcome to Pop-Up St
LeftClick, 335, 339
Sleep, 100
WinWait, Read Me File, &Next >
IfWinNotActive, Read Me File, &Next >, WinActivate, Read Me File, &Next >
WinWaitActive, Read Me File, &Next >
LeftClick, 336, 339
Sleep, 100
WinWait, Choose Destination Location, Setup will install P
IfWinNotActive, Choose Destination Location, Setup will install P, WinActivate, Choose Destination Location, Setup will install P
WinWaitActive, Choose Destination Location, Setup will install P
LeftClick, 336, 339
Sleep, 100
WinWait, Start Installation, You are now ready to
IfWinNotActive, Start Installation, You are now ready to, WinActivate, Start Installation, You are now ready to
WinWaitActive, Start Installation, You are now ready to
LeftClick, 336, 339
Sleep, 100
WinWait, Installation Complete, Pop-Up Stopper Free
IfWinNotActive, Installation Complete, Pop-Up Stopper Free , WinActivate, Installation Complete, Pop-Up Stopper Free
WinWaitActive, Installation Complete, Pop-Up Stopper Free
LeftClick, 336, 339
Sleep, 100
WinWait, Pop-Up Stopper, Pop-Up Stop
IfWinNotActive, Pop-Up Stopper, Pop-Up Stop, WinActivate, Pop-Up Stopper, Pop-Up Stop
WinWaitActive, Pop-Up Stopper, Pop-Up Stop
LeftClick, 293, 190

Thanks

SF

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
You might be able to do a WinMove to push the install window(s) entirely off the desktop and then send keys and mouse clicks to them. However, even if this works the PC would still be in use during the installation, meaning that the user wouldn't be able to safely use the keyboard or mouse during it.

The other approach is to rewrite the script to use ControlSend, ControlClick, and the other Control commands (this can be a time-consuming process, especially for someone who's never done it before). You could then hide the windows with WinHide or move them off the desktop as mentioned above. WinHide is far from certain to work and depends on how tolerant the target windows are to receiving input while they are hidden. Therefore, the WinMove approach is probably better, though I don't know for sure that it would work either.

Good luck.

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
(in response to your edited post)
You can probably replace all your left-clicks with ControlClicks, though you will have to use Window Spy to find out all the control names.

Edit: Actually, you can usually get away with using the name on the button instead of having to use Window Spy (if the controls are all buttons).

Here's the docs for ControlClick: http://www.autohotke...ontrolClick.htm

Alternatively, if the user doesn't need to use the keyboard & mouse during the installation, you could try using WinMove to move the window off-screen as I described in my other post, perhaps something like this:

WinMove, Welcome, Welcome to Pop-Up St, 100, 800

You'll have to increase the 800 number if your desktop resolution is greater than 1024x768.