Jump to content

Auto Incremental Int gets converted to Specialchars


Recommended Posts

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

Link to comment
Share on other sites

$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
Link to comment
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

Link to comment
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.

Link to comment
Share on other sites

  • Moderators

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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see 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

 

Link to comment
Share on other sites

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