Sign in to follow this  
Followers 0
eekhoorn12

Controlsend Problem

3 posts in this topic

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

Share this post


Link to post
Share on other sites



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

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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
Sign in to follow this  
Followers 0