views:

196

answers:

2

i need to hide a windows program (not visible in taskbar, system tray. visible in taskmgr). and send clicks and fill out forms on this windows program (while hidden).

possible with autoit or autohotkey ? any other suggestions ?

A: 

To hide application you need to use (AutoIt v3):

 WinSetState($application_name, "", @SW_HIDE) 

 WinSetState($application_name, "", @SW_SHOW)

Where $application_name is your application name. First one is to hide, 2nd one is to show.

I am not sure if you can fill out forms when it's hidden thou but i guess you could verify it yourself. Probably you would have to use ControlSend to directly send text to control.

MadBoy
A: 

You can hide windows like MadBoy showed and then fill/adjust controls using the "ControlCommand"-Function of AutoIt like this:

WinSetState("Screen Resolution", "", @SW_HIDE)
ControlCommand("Screen Resolution", "", "ComboBox1", "SetCurrentSelection", "2")
WinSetState("Screen Resolution", "", @SW_SHOW)

To detect which Classname a control has you must use the AutoIt Window Info tool which comes with AutoIt and is installed by default.

To fill out TextBoxes for example you would use:

ControlCommand("WinTitleHere", "", "Edit1", "EditPaste", "This is some text")

This even works with hidden windows.

MemphiZ