Jump to content

Problem with radio buttons


Recommended Posts

Hey Guys, 

I just started using this not to long ago and came across my first issue. I am trying to script an install and get to a point where I need to click on a radio button. I have tried ControlClick and ControlCommand and still nothing. I have made sure that the window is active.(And its the only thing being ran at that time) But I am still not able to find a solution. I have googled around and read a couple pages on the forum. Maybe i am not looking for the right thing?

Here is a sample of my script.(Yes I know its a bit amateurish but I just want to get something that works then refine it. Most of my experience is in dos,powershell, and vbs)

 
#RequireAdmin
ShellExecute("Program.exe")
WinWait("Program Setup")
WinWaitActive("Program Setup")
ControlClick("Program Setup", "", "[CLASS:Button; INSTANCE:1]")
;
WinWait("Program Setup")
WinWaitActive("Program Setup")
ControlClick("Program Setup", "", "[NAME:btnNext]")
;
WinWait("Program Setup","Custom Setup")
WinWaitActive("Program Setup","Custom Setup")
Send("{Down}{Down}{Down}{Down}{SPACE}{ENTER}")
;
WinWait("Program Setup")
WinWaitActive("Program Setup")
ControlCommand("Program Setup", "", "[CLASS:WindowsForms10.Window.8.app.0.1ea0a2f; TEXT:Modify Event Viewer settings; INSTANCE:1]", "Check", "")
ControlClick("Program Setup", "", "[NAME:btnNext]")
 
The Line in bold is what I am having trouble with. Per the help file it seems thats is the best way to do this. I am using the CLASS because the ID changes with every install. Perhaps that is wrong? Not sure. Some insight or links to where I can read up and solve this issue would be much appreciated.
 
Thank you!
 
Link to comment
Share on other sites

  • Moderators

As our first question always is when dealing with scripted installations - what is the application, and what command-line installation options does it support? Almost always a better way to do things than trying to manipulate the GUI.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

It does not support command line options! That is the heart of my issue. The developers of the software dropped the ball when it came to that. Not to mention that the software is just horrible and coded like absolute crap. But there is no switching since there is nobody else that offers what we need. 

Link to comment
Share on other sites

  • Moderators

Are you able to let us know what the software is? It would help to be able to see the flow of the installation routine, and match that up to your script.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

I'm sorry totally forgot to put that in the last post. Its Zoll RescueNet ePCR. Here is the window info if it helps any. This is off the radio button that I want to click.

>>>> Window <<<<
Title: RescueNet TabletPCR 5.4 Setup
Class: WindowsForms10.Window.8.app.0.1ea0a2f
Position: 263, 163
Size: 670, 432
Style: 0x16CA0000
ExStyle: 0x00050100
Handle: 0x001906BE
 
>>>> Control <<<<
Class: WindowsForms10.BUTTON.app.0.1ea0a2f
Instance: 1
ClassnameNN: WindowsForms10.BUTTON.app.0.1ea0a2f1
Name:
Advanced (Class): [CLASS:WindowsForms10.BUTTON.app.0.1ea0a2f; INSTANCE:1]
ID: 1771058
Text: Modify Event Viewer settings
Position: 223, 104
Size: 164, 17
ControlClick Coords: 14, 8
Style: 0x5600000B
ExStyle: 0x00000000
Handle: 0x001B0632
 
>>>> Mouse <<<<
Position: 503, 300
Cursor ID: 0
Color: 0xF7F3F7
 
>>>> StatusBar <<<<
 
>>>> ToolsBar <<<<
 
>>>> Visible Text <<<<
 
>>>> Hidden Text <<<<
Show advanced install options
'ZOLL Data Systems' folder location:
C:Program Files
Browse
Link to comment
Share on other sites

so the output says

[CLASS:WindowsForms10.BUTTON.app.0.1ea0a2f; INSTANCE:1]

and you have

[CLASS:WindowsForms10.Window.8.app.0.1ea0a2f; TEXT:Modify Event Viewer settings; INSTANCE:1]

ControlCommand("Program Setup", "", "[CLASS:WindowsForms10.Window.8.app.0.1ea0a2f; TEXT:Modify Event Viewer settings; INSTANCE:1]", "Check", "")

Why?

Where did you get this bit? TEXT:Modify Event Viewer settings

Spoiler

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Link to comment
Share on other sites

Per the help file I used these guidelines...

ControlCommand ( "title", "text", controlID, "command" [, "option"] )

I then used the text entry from under the control section in the window info tool. I have tried it the  way I specified and with out the "TEXT:Modify Event Viewer settings". Its like the line is being  skipped entirely  since the CommandClick below it is being triggered.

Link to comment
Share on other sites

What does

ConsoleWrite(@error&@CRLF)

under the controlcommand, output?

Edited by careca
Spoiler

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Link to comment
Share on other sites

I got 2 results...

"1" with the original line

ControlCommand("Program Setup", "", "[CLASS:WindowsForms10.Window.8.app.0.1ea0a2f; TEXT:Modify Event Viewer settings; INSTANCE:1]", "Check", "")

"0" with the original line edited (TEXT:Modify Event  Viewer  settings;  taken out)

ControlCommand("Program Setup", "", "[CLASS:WindowsForms10.Window.8.app.0.1ea0a2f; INSTANCE:1]", "Check", "")

 

Link to comment
Share on other sites

So it finds the control, with the second, but doesn't check the control?

Not sure if i can help, seems like the parameters are good..

This is the point where i would go with mouseclick.

Spoiler

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...