Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
"key" enters data into wrong browser field
#1
This worked properly on my laptop, but does not work correctly on my desktop. Any idea what is going wrong? It is supposed to enter the keyed text into the file name field on the specified web page, but now it enters the text into the part of the browser where one usually types a URL?!? I tried using the Find HTML Element tool to confirm the "HTM" statement, and while it comes up with different info on the desktop as opposed to the laptop, neither works on the desktop. Very confusing.



web "http://verichem-data-reduction.com/submit/" 1

act win(" Internet Explorer" "IEFrame")
Htm el=htm("INPUT" "uploadedfile" "" win(" Internet Explorer" "IEFrame") 0 0 0x221)
el.SetFocus
key "fred"
#2
Your code does what its supposed to on my computer.

You could also try another method of searching the web page for the input field. Such as:
Code:
Copy      Help
web "http://verichem-data-reduction.com/submit/" 1

act win(" Internet Explorer" "IEFrame")
Htm el=htm("INPUT" "uploadedfile" "<INPUT style=''FONT-SIZE: 10pt; FONT-FAMILY: Trebuchet MS'' type=file size=60 name=uploadedfile>" win(" Internet Explorer" "IEFrame") "" 0 0x225)
el.SetFocus
key "fred"

Good luck.

Matt B
Matt B
#3

This seems to work for me on all my PCs(3).


Code:
Copy      Help
int hwnd=child("" "Internet Explorer_Server" win("Internet Explorer" "IEFrame") 0x1)
act hwnd

Acc a=acc("" "TEXT" hwnd "Internet Explorer_Server" "Enter name of file to upload" 0x1C04 0x0 0x20000040)
a.Select(SELFLAG_TAKEFOCUS|SELFLAG_TAKESELECTION)
key "Some Text"
#4
Matt: I did not try your approach, but thank you for your help!

John: your sample code worked correctly and immediately!

Thanks so much for your help!

Smile

Jon


Forum Jump:


Users browsing this thread: 1 Guest(s)