Jump to content

Bug while entering uppercase


Go to solution Solved by FireFox,

Recommended Posts

Hello,
 
I'm experiencing some troubles using AutoIt.
 
Sometimes, uppercase letters become lowercase letter. And more rarely, some letters are disappearing.
I send "1 000 000 000" and with some lowercase I get "1 00à 0àà 000" (I'm a french and '0' is the typed with "SHIFT" + 'à' on an azerty keyboard).
 
Have I missed something? Here is the code :
ControlSend("ANCRE 2012", "", "", "1 000 000 000")
 
My piece of sript is very simple, I don't get why it doesn't work.
Any idea?
 
Thanks

PS : My issue has nothing to do with spam, I didn't came here for dummy stuff. I work on a web app tester which needs to enter "1 000 000 000" in some part of the app but who cares?

Link to comment
Share on other sites

First of all - Salut.

Maybe sometimes the shift fails.

Try using ControlSetText in lieu of ControlSend.

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

  • Moderators

Miminoux,

You did not read thse rules to which I linked you very carefully did you? Or you would have seen this part:

 

"Do not repost the same question if the previous thread has been locked - particularly if you merely reword the question to get around one of the prohibitions listed above"

Do NOT start a third one. :naughty:

My apologies - I appear to have done you an injustice. You explain in your first post that you are not in fact writing a spam or joke script - you just start the thread using that as an example and I jumped to conclusions. As you can see the thread is now reopened. :)

M23

Edited by Melba23
Thread reopened

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

  • Moderators

Have you tried using String commands, like so?

ControlSend("ANCRE2012","", "", StringUpper("1 000 000 000"))

Just curious if you get the same result

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

  • Moderators

True, I thought he was using that as an example, since he mentioned "some uppercase letters become lowercase".

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

It still doesn't work with {0} nor with the flag at 1.

And the issue still appears with both (I wasn't expecting 1 000 000 000 but {1} {0}{0}{0} {0}}{0}}{0} {0}{0}{0} and got {1} 'à}}{0='à}} {{0}}{0}}{0}} '0={0={0}

I think I will give up as nobody has already experienced that bug. I will use the "Send" function for now.

Oh my god, I'm a dummy. In fact I was using a library in order to use AutoIt functions though java code and I think it comes from that library. I will fix that if it still bother me when I will be almost done with that script. I got traped because I also was using "SasPlay" to test my autoIt function and that tool also has issues with uppercase. The function works fine with Scite.

Anyway, thanks a lot for your help.

Link to comment
Share on other sites

I suspect that the unbreakable space used is encoded in UTF-8 which the application has issue understanding.

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Link to comment
Share on other sites

Anyhow, instead of using Send or ControlSend, I would use ControlSetText.

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

I can't use "ControlSetText" because it's a javascript excell-like cell for which I can't find the ControlID. Then "CotnrolSetText("ANCRE 2012", "","","1 000 000 000") sets the firefox window's name to "1 000 000 000" instead of the cell.

Link to comment
Share on other sites

  • Solution

Crap trick but give it a try :

Local $sMyText = "1 000 000 000"

ClipPut($sMyText) ;put the content to the clipboard

;OPTION 1
If WinActive("ANCRE 2012") = 0 Then
    WinActivate("ANCRE 2012")
    WinWaitActive("ANCRE 2012")
EndIf
Send("^v") ;paste directly the data.

;OR OPTION 2
ControlSend("ANCRE 2012", "", "", "^v") ;paste directly the data.
Edit: Added indents.

Br, FireFox.

Edited by FireFox
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...