Miminoux Posted June 11, 2013 Share Posted June 11, 2013 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 More sharing options...
Xenobiologist Posted June 11, 2013 Share Posted June 11, 2013 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 More sharing options...
Moderators Melba23 Posted June 11, 2013 Moderators Share Posted June 11, 2013 (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. 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 June 11, 2013 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 Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted June 11, 2013 Moderators Share Posted June 11, 2013 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 More sharing options...
FireFox Posted June 11, 2013 Share Posted June 11, 2013 @MiminouxTry the flag 1 for the ControlSend function or use {0} instead of 0.@JLogan3o13Numbers can't be upper case, isn't it?Br, FireFox. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted June 11, 2013 Moderators Share Posted June 11, 2013 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 More sharing options...
Miminoux Posted June 11, 2013 Author Share Posted June 11, 2013 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 More sharing options...
jchd Posted June 11, 2013 Share Posted June 11, 2013 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 hereRegExp tutorial: enough to get startedPCRE 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 More sharing options...
Xenobiologist Posted June 11, 2013 Share Posted June 11, 2013 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 More sharing options...
Miminoux Posted June 12, 2013 Author Share Posted June 12, 2013 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 More sharing options...
Solution FireFox Posted June 12, 2013 Solution Share Posted June 12, 2013 (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 June 12, 2013 by FireFox Link to comment Share on other sites More sharing options...
Miminoux Posted June 12, 2013 Author Share Posted June 12, 2013 Oh great ! It works fine ! Thank you very much ! I used the option 2 since I did't want to use the "Send" function. Link to comment Share on other sites More sharing options...
FireFox Posted June 12, 2013 Share Posted June 12, 2013 Okay, you're welcome Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now