| View previous topic :: View next topic |
| Author |
Message |
JimKarvo
Joined: 09 Jan 2009 Posts: 104
|
Posted: Mon May 25, 2009 7:50 pm Post subject: Strange Problem with COM... |
|
|
Hello..
I use that line:
| Code: | | COM_Invoke(itemtbUsername:=COM_Invoke(all1:=COM_Invoke(document:=COM_Invoke(pwb,"Document"),"All"),"Item","tbUsername"),"value","6978046100") |
If I write full the "6978046100" the script writes byself, "-1611888492"
If I use "697804610" all is ok.. but I want to use the "6978046100"
Any ideas?
Last edited by JimKarvo on Mon May 25, 2009 8:33 pm; edited 1 time in total |
|
| Back to top |
|
 |
sinkfaze
Joined: 18 Mar 2008 Posts: 5043 Location: the tunnel(?=light)
|
Posted: Mon May 25, 2009 8:18 pm Post subject: |
|
|
If you're using this for a website, I think you should be able to condense the call down to this:
| Code: | | COM_Invoke(pwb,"document.all.item[tbUsername].value","6978046100") |
Try that call and see if there's any difference. I've seen problems sending leading zeroes but never trailing zeroes. _________________ Try Quick Search for Autohotkey or see the tutorial for newbies. |
|
| Back to top |
|
 |
JimKarvo
Joined: 09 Jan 2009 Posts: 104
|
Posted: Mon May 25, 2009 8:26 pm Post subject: |
|
|
| Generally, because of I am trying to learn the COM fuctions (for websites for now) are there any documation for the "COM_Invoke()" and its syntax? |
|
| Back to top |
|
 |
JimKarvo
Joined: 09 Jan 2009 Posts: 104
|
Posted: Mon May 25, 2009 8:28 pm Post subject: |
|
|
| sinkfaze wrote: | If you're using this for a website, I think you should be able to condense the call down to this:
| Code: | | COM_Invoke(pwb,"document.all.item[tbUsername].value","6978046100") |
Try that call and see if there's any difference. I've seen problems sending leading zeroes but never trailing zeroes. |
No solution.. The same problem..  |
|
| Back to top |
|
 |
JimKarvo
Joined: 09 Jan 2009 Posts: 104
|
Posted: Mon May 25, 2009 8:34 pm Post subject: |
|
|
| Is it possible to save the "6978046100" to a var and pass that number to COM? Because the "%var%" don't work.. [it writes "%var%" instead of the var's contain..] |
|
| Back to top |
|
 |
jethrow
Joined: 24 May 2009 Posts: 1907 Location: Iowa, USA
|
Posted: Mon May 25, 2009 9:37 pm Post subject: |
|
|
yes, leave off the percent signs
| Code: | var = 6978046100
COM_Invoke(pwb,"document.all.item[tbUsername].value", var)
|
|
|
| Back to top |
|
 |
sinkfaze
Joined: 18 Mar 2008 Posts: 5043 Location: the tunnel(?=light)
|
Posted: Mon May 25, 2009 9:42 pm Post subject: |
|
|
| JimKarvo wrote: | No solution.. The same problem..  |
Hmm...you might try this and see if it works...
| Code: | | COM_Invoke_(pwb,"document.all.item[tbUsername].value",VT_BSTR:=8,"6978046100") |
Also, are you getting any error messages? Are you able to successfully send COM calls to other fields without this problem? _________________ Try Quick Search for Autohotkey or see the tutorial for newbies. |
|
| Back to top |
|
 |
Sean
Joined: 12 Feb 2007 Posts: 2462
|
Posted: Tue May 26, 2009 1:33 am Post subject: |
|
|
What happened was essentially this.
| Code: | x := " "
NumPut(6978046100, x, 0, "int")
MsgBox % NumGet(x, 0, "int")
|
You cannot use a number out of range of (un)signed 32-bit integers in COM_Invoke, unless you pass it as a string. |
|
| Back to top |
|
 |
tank
Joined: 21 Dec 2007 Posts: 3700 Location: Louisville KY USA
|
Posted: Tue May 26, 2009 3:00 am Post subject: |
|
|
SinkFaze answer works(passes the number as a string) You should use it _________________
We are troubled on every side‚ yet not distressed; we are perplexed‚
but not in despair; Persecuted‚ but not forsaken; cast down‚ but not destroyed; |
|
| Back to top |
|
 |
Jim.Karvo Guest
|
Posted: Tue May 26, 2009 1:00 pm Post subject: |
|
|
| sinkfaze wrote: | | JimKarvo wrote: | No solution.. The same problem..  |
Hmm...you might try this and see if it works...
| Code: | | COM_Invoke_(pwb,"document.all.item[tbUsername].value",VT_BSTR:=8,"6978046100") |
Also, are you getting any error messages? Are you able to successfully send COM calls to other fields without this problem? |
It is ok, but How Could I save the mobile number to a var, and then pass it?
That code doesn't work...
| Code: |
var = 6978046100
COM_Invoke_(pwb,"document.all.item[tbUsername].value",VT_BSTR:=8, var) |
|
|
| Back to top |
|
 |
sinkfaze
Joined: 18 Mar 2008 Posts: 5043 Location: the tunnel(?=light)
|
Posted: Tue May 26, 2009 1:11 pm Post subject: |
|
|
| Jim.Karvo wrote: | That code doesn't work...
| Code: |
var = 6978046100
COM_Invoke_(pwb,"document.all.item[tbUsername].value",VT_BSTR:=8, var) |
|
Try this:
| Code: |
var = 6978046100
COM_Invoke_(pwb,"document.all.item[tbUsername].value",VT_BSTR:=8, "" var "") |
_________________ Try Quick Search for Autohotkey or see the tutorial for newbies. |
|
| Back to top |
|
 |
tank
Joined: 21 Dec 2007 Posts: 3700 Location: Louisville KY USA
|
Posted: Tue May 26, 2009 3:25 pm Post subject: |
|
|
there is no reason that it would need the double quotes
there are really only 2 options here
your getting a COM error or you have disabled the prompt
if you have disabled the prompt
then what does this return | Code: | | msgbox % COM_Invoke(pwb,"document.all.item[tbUsername].outerHTML") | if it returns nothing then its an invalid dom reference or your attempting to manipulate it before its available _________________
We are troubled on every side‚ yet not distressed; we are perplexed‚
but not in despair; Persecuted‚ but not forsaken; cast down‚ but not destroyed; |
|
| Back to top |
|
 |
|