lukeone

Auto Incremental Int gets converted to Specialchars

10 posts in this topic

Hi,

I have the problem that an auto incremental integer from a for loop, got sent with pressed shift, since the special characters are those shift-binded at the actual value at the keyboard.

So the number "5986" gets "%)(&".

I tried different approaches like

Send("{CAPSLOCK OFF}")

before the int got sent.

Im also casting the int to string with String() before sending it.

Very strange is the fact, that the problem occurs just after passing the loop a few times with a correct sent int.

Any idea?

Thanks in advance and many greetings,

Luke

Share this post


Link to post
Share on other sites



Post some code that demonstrates the problem.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

$steps = 0
Run("app.exe")
WinWaitActive("xxx")
WinClose("xxx")
WinSetState("xxx2","",@SW_MAXIMIZE)
WinWaitActive("xxx2")
Sleep(2)
Send("!w")
Sleep(1)
While 1
    Send("{HOME}")
    For $i = 0 To $steps
        Send("{DOWN}")
    Next
    Send("{ENTER}")
    WinWaitActive("[REGEXPTITLE:xxx3\s\W\D*]","")
    $title = WinGetTitle("[REGEXPTITLE:xxx3\s\W\D*]")
    WinSetState($title,"",@SW_MAXIMIZE)
    Send("{ALT}{a}")
    for $k = 1 To 5
        Send("{DOWN}")
    Next
    Send("{ENTER}")
    WinActivate("xxx4")
    if WinWait("xxx4","",3) Then
        Send("{ENTER}")
        WinWait("xxx5","",3)
        Send("{CAPSLOCK OFF}")
        $stringified = String($steps)
        Send(StringLower($stringified)&StringReplace($title,"/"," "),1)
        Send("{ENTER}")
        WinWaitActive("[TITLE:xxx6; CLASS:#666]","")
        Send("{ENTER}")
    EndIf
    WinWait($title,"")
    WinClose($title)
    $steps = $steps + 1
WEnd

Thats the whole script. :)

Edited by lukeone

Share this post


Link to post
Share on other sites

And the name of the program you are trying to automate?

Share this post


Link to post
Share on other sites

Hi Danp2,

I have to keep this discreet as you can see.

I hope this is respected, because it concerns company internals and its legally required from me, so I'm sorry about that.

However since I can't make the application public, it shouldn't be necessary or any help to the problem.

Thanks and best regards,

Luke

Share this post


Link to post
Share on other sites

You are legally prevented from disclosing the name of the application? Sounds suspicious to me.

FWIW, there are generally better ways to interact with most applications other than using the Send command.

Share this post


Link to post
Share on other sites

You are legally prevented from disclosing the name of the application? Sounds suspicious to me.

 

That's right.

I can't tell you more, but be reassured I'm not from the feds and its nothing illegal.

 

FWIW, there are generally better ways to interact with most applications other than using the Send command.

 

Thanks for the suggestion, but I still wonder how the Integer gets converted or SHIFT is pressed.

Share this post


Link to post
Share on other sites

You may want to check out this FAQ.

Share this post


Link to post
Share on other sites

lukeone,

Take a look at this Wiki FAQ entry - it might help.

 

but be reassured I'm not from the feds and its nothing illegal

I am pretty sure the first of those was not what was being suggested - but the >Forum rules do explain what might be construed as "illegal" here.

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

You may want to check out this FAQ.

 

Thanks I think this should help :)

lukeone,

Take a look at this Wiki FAQ entry - it might help.

 

I am pretty sure the first of those was not what was being suggested - but the >Forum rules do explain what might be construed as "illegal" here.

M23

 

Another thanks is flying out to you.

I read the rules, its still legit :)

My last try to make it clear:

I'm not American and our laws are different.

If I tell the wrong company internals public, they could sue me really bad.

Thats my only concern.

The application itself is completely company property (thats what the discreetness is all about), if you mind that.

Thanks again and kind regards,

Luke

Edited by lukeone

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