cassetti Posted July 10, 2006 Share Posted July 10, 2006 Here is the code i'm trying to do - it won't work - and i'm trying to figure out a workaround that doesn't involve using the mouse #include <IE.au3> $oIE = _IE_Example("form") $oForm = _IEFormGetObjByName($oIE, "ExampleForm") $oFile = _IEFormElementGetObjByName($oForm, 'fileExample') _IEFormElementSetValue($oFile, "c:\test.txt") any suggestions on how to actually get it to work? Link to comment Share on other sites More sharing options...
Moderators big_daddy Posted July 10, 2006 Moderators Share Posted July 10, 2006 Try this: #include <IE.au3> $sFilePath = "C:\test.txt" $oIE = _IE_Example ("form") $oForm = _IEFormGetObjByName ($oIE, "ExampleForm") $oFile = _IEFormElementGetObjByName ($oForm, 'fileExample') $oFile.focus () Send("{Tab}") Send("{Space}") WinWait("Choose file") ; This just keeps it from making a hidden error If FileExists($sFilePath) Then WinSetState("Choose file", "", @SW_HIDE) EndIf ControlSetText("Choose file", "", "Edit1", $sFilePath) ControlClick("Choose file", "", "Button2") Link to comment Share on other sites More sharing options...
cassetti Posted July 10, 2006 Author Share Posted July 10, 2006 Yup - after doing more searching - i found the answer about the inability to modify it directly - so i used .focus thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now