AutoHotkey Community

It is currently May 26th, 2012, 7:05 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 12 posts ] 
Author Message
PostPosted: May 25th, 2009, 8:50 pm 
Offline

Joined: January 9th, 2009, 10:42 pm
Posts: 104
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 May 25th, 2009, 9:33 pm, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 25th, 2009, 9:18 pm 
Offline
User avatar

Joined: March 19th, 2008, 12:43 am
Posts: 5480
Location: the tunnel(?=light)
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.

_________________
Image
Try Quick Search for Autohotkey or see the tutorial for newbies.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 25th, 2009, 9:26 pm 
Offline

Joined: January 9th, 2009, 10:42 pm
Posts: 104
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?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 25th, 2009, 9:28 pm 
Offline

Joined: January 9th, 2009, 10:42 pm
Posts: 104
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.. :(


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 25th, 2009, 9:34 pm 
Offline

Joined: January 9th, 2009, 10:42 pm
Posts: 104
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..]


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 25th, 2009, 10:37 pm 
Offline
User avatar

Joined: May 24th, 2009, 5:35 am
Posts: 2099
Location: Iowa, USA
yes, leave off the percent signs

Code:
var = 6978046100
COM_Invoke(pwb,"document.all.item[tbUsername].value", var)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 25th, 2009, 10:42 pm 
Offline
User avatar

Joined: March 19th, 2008, 12:43 am
Posts: 5480
Location: the tunnel(?=light)
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?

_________________
Image
Try Quick Search for Autohotkey or see the tutorial for newbies.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 26th, 2009, 2:33 am 
Offline

Joined: February 12th, 2007, 7:54 am
Posts: 2462
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 26th, 2009, 4:00 am 
Offline
User avatar

Joined: December 21st, 2007, 3:14 pm
Posts: 3826
Location: Louisville KY USA
SinkFaze answer works(passes the number as a string) You should use it

_________________
No matter what your oppinion Please join this discussion
Formal request to Polyethene
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 26th, 2009, 2:00 pm 
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)


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: May 26th, 2009, 2:11 pm 
Offline
User avatar

Joined: March 19th, 2008, 12:43 am
Posts: 5480
Location: the tunnel(?=light)
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 "")

_________________
Image
Try Quick Search for Autohotkey or see the tutorial for newbies.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 26th, 2009, 4:25 pm 
Offline
User avatar

Joined: December 21st, 2007, 3:14 pm
Posts: 3826
Location: Louisville KY USA
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

_________________
No matter what your oppinion Please join this discussion
Formal request to Polyethene
Image


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Apollo, Bing [Bot], dra, Exabot [Bot], Google Feedfetcher, rbrtryn and 58 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group