Jump to content

Lower casing problem


Recommended Posts

I have a GUI form which, when submitted, fills out information in a program. Everything works fine, except when I Send() one of the variables, the case is switched on every letter. Anyone encountered this?

This is basically what is happening:

$special = "This Is A STRING"
MsgBox(4096,'debug:' , '$special:' & $special);### Debug MSGBOX 
Send($special & "{ENTER}{DOWN}")

The MsgBox shows the string formatted as it is typed. Then when I send it, it shows in the form as "tHIS iS a string".

I even tried

Send(StringUpper($special) & "{ENTER}{DOWN}");  and StringLower()

And it still sent the different case version. This isn't a show stopper, but it is just strange behavior that I have never experienced using AutoIt with the crap program I'm stuck with at work.

I've half assed a solution by changing the string to all lower case through a temporary variable, which then sends the string upper cased (just about everything at my work is all upper cased, so this isn't a big deal.)

Link to comment
Share on other sites

but then he'd have to add another line to send the {enter}{down} commands.

send("This Is A STRING",1); this line sent RAW
send("{enter}{down}",0)   ; this line sent normal
Edited by Blue_Drache

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Link to comment
Share on other sites

Caps lock is on maybe?

<{POST_SNAPBACK}>

Who would have thought? Yes, sending {CAPSLOCK off}, then the text, then {CAPSLOCK on} did the job. Very Strange. Here is the significant code, for what it's worth:

Case $msg = $submit
            $po = GUIRead($gpo)
            $vendor = GUIRead($gvendor)
            $store = GUIRead($gstore)
            $start_date = GUIRead($gstart_date)
            $end_date = GUIRead($gend_date)
            $special = GUIRead($gspecial)
            HotKeySet("{ENTER}");unregister
            GUIDelete()
            ExitLoop
         Case Else
           ;;;
      EndSelect
   Wend

   WinActivate("Retail Pro")
   Send("!n")
   Send($po & "{DOWN}" & $store & "{DOWN}" & $store & "{TAB}" & $vendor & "{DOWN}")
   If WinWaitActive("Retail Pro", "Vendors", 2) Then
      WinWaitActive("Retail Pro", "FormPage")
      Send("{DOWN}")
   EndIf
   Send("{CAPSLOCK off}" & $special & "{ENTER}{DOWN}{CAPSLOCK on}")

See, the strange thing is, $po is a string value as well and gets sent correctly. It's just bizarre to me.

Anyways, thanks this-is-me.

Link to comment
Share on other sites

This is some of the functionality that would be great if it were included in au3. In python you can manipulate strings very easily and Jon, I think that you could wrap a few commands. string.lower() etc.

-I am the giver of life and the bringer of death.

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