 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
VibrantLife
Joined: 29 Oct 2009 Posts: 50
|
Posted: Mon Feb 22, 2010 8:22 pm Post subject: StringReplace comma in Clipboard still output (html char44) |
|
|
When i use StringReplace to get rid of
comma's from a string in the Clipboard.
Like: This comma, should be removed
It output like: This comma, should be removed.
The server which recieves this input from the Web form chokes on it,
with a server error in Internet explorer because it doesn't expect and accept html code.
code:
| Code: | name:=iWeb_getDomObj(pwb,"name")
Clipboard:=name
StringReplace, Clipboard, Clipboard, `,,, ALL
Send, {CtrlDown}v{CtrlUp}
|
when i use:
| Code: | Send, {CtrlDown}a{CtrlUp}{CtrlDown}c{CtrlUp}
StringReplace, Clipboard, Clipboard, `,,, ALL
Send, {CtrlDown}v{CtrlUp} |
It removes the comma's just fine.
What is causing this?
PS: i need to use the Clipboard for this,
Because the Web Form in Iexplorer doesn't save the
iWeb_setDomObj _________________ The signature is away at the moment, please leave a message after the beep... |
|
| Back to top |
|
 |
Guest
|
Posted: Mon Feb 22, 2010 8:27 pm Post subject: |
|
|
What is the contents of "name" - ie:
| Code: | | MsgBox, % name:=iWeb_getDomObj(pwb,"name") |
|
|
| Back to top |
|
 |
Leef_me
Joined: 08 Apr 2009 Posts: 5336 Location: San Diego, California
|
Posted: Mon Feb 22, 2010 8:31 pm Post subject: |
|
|
I don't understand the web code but I wonder if another debugging tool would help.
| Code: |
name:=iWeb_getDomObj(pwb,"name")
listvars ; <---- this brings up a separate window showing program variables
msgbox before clipboard copy ; <--close the msgbox to continue the program
Clipboard:=name
listvars ; <--- this will update the previous windown shown by listvars.
msgbox after clipboard copy
StringReplace, Clipboard, Clipboard, `,,, ALL
Send, {CtrlDown}v{CtrlUp}
|
|
|
| Back to top |
|
 |
VibrantLife
Joined: 29 Oct 2009 Posts: 50
|
Posted: Mon Feb 22, 2010 8:39 pm Post subject: |
|
|
| Anonymous wrote: | What is the contents of "name" - ie:
| Code: | | MsgBox, % name:=iWeb_getDomObj(pwb,"name") |
|
The content are random names of company's with comma's like:
Petrol, oil company
I just like to remove the comma, but the output result in :
Petrol, oil company _________________ The signature is away at the moment, please leave a message after the beep... |
|
| Back to top |
|
 |
sinkfaze
Joined: 18 Mar 2008 Posts: 5043 Location: the tunnel(?=light)
|
Posted: Mon Feb 22, 2010 8:42 pm Post subject: |
|
|
iWeb_getDomObj has a built-in portion of its code that converts all commas to their character entity equivalent, which is , ;. tank would be better fit to explain the rationale behind adding this functionality than I, but nonetheless that is why you're seeing that come up. Since AHK is (or should be) eating the semicolon once passed to the variable you'll want to use this to remove the 'comma':
| Code: | | StringReplace, Clipboard, Clipboard, ,, , All |
_________________ Try Quick Search for Autohotkey or see the tutorial for newbies. |
|
| Back to top |
|
 |
VibrantLife
Joined: 29 Oct 2009 Posts: 50
|
Posted: Mon Feb 22, 2010 8:51 pm Post subject: |
|
|
| sinkfaze wrote: | iWeb_getDomObj has a built-in portion of its code that converts all commas to their character entity equivalent, which is , ;. tank would be better fit to explain the rationale behind adding this functionality than I, but nonetheless that is why you're seeing that come up. Since AHK is (or should be) eating the semicolon once passed to the variable you'll want to use this to remove the 'comma':
| Code: | | StringReplace, Clipboard, Clipboard, ,, , All |
|
Ah muchos gracias!  _________________ The signature is away at the moment, please leave a message after the beep... |
|
| 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
|