Sign in to follow this  
Followers 0
eekhoorn12

Decoding muliple ascii codes at ones

2 posts in this topic

Some time a go I had a problem with controlsend. Thanks to you I got that working. But I read somewhere that the best way to send plain text with controlsend is with chr codes. There is my problem. I'm trying to send a folder path, which is given with a browse button in the main GUI, with control send.

$END_RESULT = ""
$q = ""
While 1

    $s_Result = "D:\Working pad"
           For $x = 1 to StringLen($s_Result)
               $q = $q + 1
            $i = StringMid($s_Result,$x,1)
            $a = Asc ($i)
            if $x = StringLen($s_Result) then
                $END_RESULT = $END_RESULT & " " & "chr(" & $a & ")"
            else
                  $END_RESULT = $END_RESULT & " " & "chr(" & $a & ")" & " " & chr(38)
            endif
        next
    
      msgbox(0,"test",$END_RESULT)
   ;Start PowerPost
    run("pp.exe")
   ;Wacht 1500 milliseconden
    sleep(2000)
    ControlSend(' YENC-POWER-POST-A&A-v11b', "", "", Chr(94)& Chr(113))
    sleep(50)
    ControlSend('Openen', "", 1152, $END_RESULT)
    sleep(50)
    msgbox(0,"test","Map getyptd")
    ControlSend('Openen', "", 1152, "{ENTER}",0)
    sleep(50)
    msgbox(0,"test","Map geopend")
    ControlSend('Openen', "", 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

That is the code I'm using. My problem is with this line ControlSend('Openen', "", 1152, $END_RESULT).

There I'm trying to send the path name but it doesn't work. I've translated it into chr() but then it sends out the chr codes.

How can i solve this.

Marcel

Share this post


Link to post
Share on other sites



Thanks for the tip.

unfortunately his site is down so i cant test it yet

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