Sign in to follow this  
Followers 0
Miminoux

Bug while entering uppercase

13 posts in this topic

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?

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

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

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

Have you tried using String commands, like so?

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

Just curious if you get the same result


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

@Miminoux

Try the flag 1 for the ControlSend function or use {0} instead of 0.

@JLogan3o13

Numbers can't be upper case, isn't it?

Br, FireFox.


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites

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


√-1 2^3 ∑ π, and it was delicious!

Share this post


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

Share this post


Link to post
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)

Share this post


Link to post
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

Share this post


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

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

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

 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites

Oh great ! It works fine ! Thank you very much ! I used the option 2 since I did't want to use the "Send" function.

Share this post


Link to post
Share on other sites

Okay, you're welcome :)


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

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