 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
MetuZ
Joined: 03 Mar 2008 Posts: 19
|
Posted: Tue May 27, 2008 3:38 am Post subject: Problem with Gui Edit |
|
|
It saves what I want it to save, however; it doesn't save capital letters etc. Example:
| Code: |
Gui, Add, Text, x10 y33 w80 h50, Set E-Mail
Gui, Add, Button, x70 y30 w20 h20 g1,
Gui, Add, Edit, x100 y30 w100 h20 vEmail
|
| Code: |
1:
Gui,submit,nohide
ControlSend, , .setemail %Email%{Enter}, ahk_class Ultima Online
return
|
Let's say I had the E-mail typed as "Go4It@yahoo.com".
It would then be "go4it2yahoo.com"
It doesn't save the format of the keys.
Any help would be greatly appreciated, thank you. |
|
| Back to top |
|
 |
MetuZ
Joined: 03 Mar 2008 Posts: 19
|
Posted: Tue May 27, 2008 5:52 am Post subject: |
|
|
| Bump please, sorry this is just driving me nuts. |
|
| Back to top |
|
 |
pokercurious
Joined: 16 Dec 2007 Posts: 42
|
Posted: Tue May 27, 2008 6:20 am Post subject: |
|
|
I'm pretty sure upper/lowercase info is stored properly in AHK. For example, the following works just like you'd expect it to:
| Code: | #SingleInstance, force
Gui, Add, Edit, w200 vmyText
Gui, Add, Button, gShowText, Show me what I entered
Gui, Show
return
ShowText:
Gui, Submit, NoHide
MsgBox, % myText
return |
The fact that it changed "@" to "2" is weird, and maybe it has something to do with the client - I don't know anything about Ultima Online. |
|
| Back to top |
|
 |
engunneer
Joined: 30 Aug 2005 Posts: 6804 Location: Pacific Northwest, US
|
Posted: Tue May 27, 2008 5:25 pm Post subject: |
|
|
I suspect that pokercurious is right. Optima is probably not receiving the controlsend right. you might try a different sendmode. _________________
Unless otherwise noted, all code is untested.
Common Answers: 1.(Loops, Viruses, etc.) 2. Search 3.RTFM |
|
| Back to top |
|
 |
MetuZ
Joined: 03 Mar 2008 Posts: 19
|
Posted: Wed May 28, 2008 6:24 pm Post subject: |
|
|
| Quote: | | To start a new line in a multi-line edit control, the last parameter (contents) may contain either a solitary linefeed (`n) or a carriage return and linefeed (`r`n). Both methods produce literal `r`n pairs inside the Edit control. However, when the control is saved to its variable via Gui Submit or GuiControlGet, each `r`n in the text is always translated to a plain linefeed (`n). To write the text to a file, follow this example: FileAppend, %MyEdit%, C:\Saved File.txt |
That is the problem. But there has to be away around it. |
|
| Back to top |
|
 |
MetuZ
Joined: 03 Mar 2008 Posts: 19
|
Posted: Wed May 28, 2008 8:19 pm Post subject: |
|
|
| Is there anyway to save it to a more permanent var? Basically so it doesn't reference from the edit, it references from something more stable, a more stable var. I only see a problem with it referencing from the Gui. I dunno if this makes any sense but it's all I can think of lol. Thanks for the help. |
|
| Back to top |
|
 |
Z Gecko Guest
|
Posted: Wed May 28, 2008 8:39 pm Post subject: |
|
|
Did you notice the post from pokercurious and engunneer ?
| Quote: | | The fact that it changed "@" to "2" is weird, and maybe it has something to do with the client - I don't know anything about Ultima Online. |
| Quote: | | Optima is probably not receiving the controlsend right. you might try a different sendmode. |
The point is, ahk stores your data without fail. (the carriage return/linefeed issue you quoted, is not related to your problem)
So do as engunneer insisted, and try different send modes. |
|
| Back to top |
|
 |
MetuZ
Joined: 03 Mar 2008 Posts: 19
|
Posted: Thu May 29, 2008 6:41 am Post subject: |
|
|
| Quote: | | However, when the control is saved to its variable via Gui Submit or GuiControlGet, each `r`n in the text is always translated to a plain linefeed (`n). |
That line says otherwise. It has nothing to do with the program I'm sending it to it. If you read that correctly, you would of understood that. I just so happen to be using Gui Submit. So please, before you post under a guest account, I'd appreciate it if you knew what you were talking about before giving me rude advice.
Thank you. |
|
| Back to top |
|
 |
Z Gecko Guest
|
Posted: Thu May 29, 2008 7:22 am Post subject: |
|
|
Do you have tested,
that the translation of carriage return/linefeed pairs to plain linefeed in a string
does change uppercase letters to lowercase letters and the @ to 2 ?
Well, i did (just to be extra shure). And (as expected) the string shows no weird changings.
And pokercurious even gave you a script, that proofs this.
So, again, do as engunneer insisted, and try different send modes.
btw.: when we are talking about rudeness, what about ignoring the two people, who tried to help you? |
|
| Back to top |
|
 |
Zed Gecko
Joined: 23 Sep 2006 Posts: 98
|
Posted: Thu May 29, 2008 7:26 am Post subject: |
|
|
And just because of your guest-account issue. _________________ 1) All my code can be reused in ANY way. 2) Please check the help and the forum-search, before posting questions; the answer is out there... |
|
| Back to top |
|
 |
Lexikos
Joined: 17 Oct 2006 Posts: 2605 Location: Australia, Qld
|
Posted: Thu May 29, 2008 7:28 am Post subject: |
|
|
Believe us when we say linefeeds have nothing to do with shifted characters becoming unshifted. To Send, `r`n is the same as `n`n or {Enter}{Enter}.
I suspect Ultima Online is ignoring or not detecting the Shift keystrokes generated by ControlSend.
| the manual wrote: | By default, modifier keystrokes (Control, Alt, Shift, and Win) are sent as they normally would be by the Send command. This allows command prompt and other console windows to properly detect uppercase letters, control characters, etc. It may also improve reliability in other ways.
However, in some cases these modifier events may interfere with the active window, especially if the user is actively typing during a ControlSend or if the Alt key is being sent (since Alt activates the active window's menu bar). This can be avoided by explicitly sending modifier up and down events as in this example:
ControlSend, Edit1, {Alt down}f{Alt up}, Untitled - Notepad
| If sending "Go4It@yahoo.com" doesn't work, try
| Code: | | Send, {Shift Down}g{Shift Up}o4{Shift Down}i{Shift Up}t{Shift Down}2{Shift Up}yahoo.com |
If that doesn't work either, I suggest you try increasing the key delay as mentioned in the FAQ.
Btw, ControlSend does not support different send modes... |
|
| Back to top |
|
 |
MetuZ
Joined: 03 Mar 2008 Posts: 19
|
Posted: Thu May 29, 2008 7:33 am Post subject: |
|
|
Well sorry for the confusion. I haven't found any other way to send it to the Window Ultima Online. So, I have to use ControlSend to get it to send to ahk_class Ultima Online. Regular "Send" doesn't send any information at all.
Thank you. |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|