Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Here's the example I have. You'll have to alter the filename and may need to alter the dialog box name too.
#DefineFunction startMSIE(url) msie = ObjectCreate("InternetExplorer.Application") msie.addressbar = @FALSE msie.statusbar = @FALSE msie.menubar = @FALSE msie.toolbar = @FALSE msie.visible = @TRUE msie.navigate(url) WaitForMSIE(msie) Return(msie) #EndFunction #DefineFunction WaitForMSIE(msie) While msie.busy || msie.readystate <> 4 TimeDelay(0.5) EndWhile Return #EndFunction #DefineSubRoutine BrowseButtonClicked() cf = "~Choose file" WinWaitExist(cf, 1) SendKeysTo(cf, fname) Return #EndSubRoutine url = "about:blank" br = startMSIE(url) ;;;;;;;; make sure you change this to a filename that's within the current folder ; your Choose file opens to... fname = `"Binary Search.txt"` ;<-- must quote if you have spaces in file name... br.document.writeln(`<input type="file" id="Name" size="50"/><br/><br/><input type="submit" id="MySubmit"/>`) NameInput = br.document.all.Name Run(StrCat(DirScript(), "SendKeys.wbt"), fname) ;<-- can't use CALL must use RUN... NameInput.click Message("Debug", "The script can now continue...") br.quit Exit
Sendkeys.wbt
pwn = "~Choose file" WinWaitExist(pwn, 10) SendKeysTo(pwn, "%param1%{tab}{enter}") Return Exit
Article ID: W17167
File Created: 2007:07:03:14:28:34
Last Updated: 2007:07:03:14:28:34