Jump to content

Recommended Posts

Posted

I have the following code

While 1
    $s_Result = "D:\films"
       
    IniWrite ( "POWRPOST.ini", "Settings", "LastDir", $s_Result)
    
    run("pp.exe")
    sleep(2000)
    ControlSend(' YENC-POWER-POST-A&A-v11b', "", "", Chr(94)& Chr(113))
    msgbox(0,"test","Map getyptd")
    sleep(50)
    ControlSend('Openen', "FolderView", 1, Chr(94)& Chr(97))
    msgbox(0,"test","Alles geselecteerd")
    sleep(50)
    ControlSend('Openen', "", 1, "{ENTER}",0)
    msgbox(0,"test","druk op enter")
    exitloop
Wend

It is supposed to select all the files in a specific folder, $s_Result.

When the program is in focus it works fine. It opens the open dialog box of the program, opens the folder and selects all the files.

But when I minimize the program it doesn´t select all the files.

Marcel

Posted

I have the following code

While 1
    $s_Result = "D:\films"
       
    IniWrite ( "POWRPOST.ini", "Settings", "LastDir", $s_Result)
    
    run("pp.exe")
    sleep(2000)
    ControlSend(' YENC-POWER-POST-A&A-v11b', "", "", Chr(94)& Chr(113))
    msgbox(0,"test","Map getyptd")
    sleep(50)
    ControlSend('Openen', "FolderView", 1, Chr(94)& Chr(97))
    msgbox(0,"test","Alles geselecteerd")
    sleep(50)
    ControlSend('Openen', "", 1, "{ENTER}",0)
    msgbox(0,"test","druk op enter")
    exitloop
Wend

It is supposed to select all the files in a specific folder, $s_Result.

When the program is in focus it works fine. It opens the open dialog box of the program, opens the folder and selects all the files.

But when I minimize the program it doesn´t select all the files.

Marcel

first i'd change your sleep(50)'s to winwait()'s so that incase the window isn't ready (more possible when the window is in the background and running at lower priority) it doesn't try to continue before the program is ready to receive what you're sending. Let me know if that doesn't fix it...
Posted

I´ve tried it and unfortunately that didn´t help. But thanks for the tip. It made me look up again what controlsend did and then I saw ControlListView. I tried that and it worked.

Thanks

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
  • Recently Browsing   0 members

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