Jump to content

Multiple buttons with the same instance


Go to solution Solved by ioa747,

Recommended Posts

Hello,
I'm trying to automate slideshow generation on IrfanView software. I've succeeded using mouse clicks based on position, and now I'm trying to do it with instances of different buttons. However, I've encountered a situation where multiple buttons have the same instance (See the image just below).
I was wondering if it's still possible or if I still need to resort to mouse clicks based on position.
 

Image : 

image.png.62e134ce0e343abf82084506872adbb0.png

 

Infos :
(The instance 40 corresponds to all 5 buttons.)

>>>> Window <<<<
Title:    Slideshow
Class:    #32770
Position:    240, 204
Size:    1002, 782
Style:    0x96CC00C4
ExStyle:    0x00010101
Handle:    0x00000000000E0314

>>>> Control <<<<
Class:    Button
Instance:    40
ClassnameNN:    Button40
Name:    
Advanced (Class):    [CLASS:Button; INSTANCE:40]
ID:    
Text:    
Position:    3, 584
Size:    230, 154
ControlClick Coords:    104, 107
Style:    0x50000007
ExStyle:    0x00000004
Handle:    0x0000000000090D2C


Code : 

Run("C:\Program Files\IrfanView\i_view64.exe")
Sleep(500)
WinSetState("[CLASS:IrfanView]", "", @SW_MAXIMIZE)
Send("w")
Sleep(250)
WinSetState("[CLASS:#32770]", "", @SW_MAXIMIZE)
Sleep(250)
ControlClick( "Slideshow", "", "[CLASS:Button; INSTANCE:10]")
ControlClick( "Slideshow", "", "[CLASS:Edit; INSTANCE:1]")
Send("C:\test\Images")
Send ("{ENTER}")
ControlClick( "Slideshow", "", "[CLASS:Button; INSTANCE:8]")
ControlClick( "Slideshow", "", "[CLASS:Button; INSTANCE:40]")

 

Thank you in advance for your help, and sorry if this post has already been asked.

Link to comment
Share on other sites

  • Solution
Posted (edited)

it worked for me   https://www.autoitscript.com/forum/files/file/478-control-viewer-mod/

Button31  =  Load filenames from TXT file
Button32  =  Save filenames as TXT file
Button33  = Save slideshow as  EXE/SCR
Button34  =  Burn slideshow to CD/DVD
Button43  =  Save slideshow as Video

i_view32.exe =  Version 4.66 - 32 bit
the same to
Version 4.66 - 64 bit

 

 

Edited by ioa747

I know that I know nothing

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...