murali33 Posted June 29, 2013 Posted June 29, 2013 hi all, i tried to set the value in file path to browse button input box.but its not working.pls any one help me my code, While 1 Switch GUIGetMsg() Case $Btn $sPath = FileOpenDialog("Open a file", @desktopdir, "All file (*.*)") ;~ If $sPath Then GUICtrlSetData($EXCEL, FileGetShortName($sPath)) If $sPath Then GUICtrlSetData($EXCEL, $sPath) case $Button1 $EXCEL1=GUICtrlRead($EXCEL) ;$IP1=GUICtrlRead($IP) Global $sCellValue6 ="" ;MsgBox(0, "Example", "Window is minimized") Global $oIE=_IECreate($sCellValue6) Sleep(1000) Send("{F4}") Sleep(2000) Send("http://192.168.1.1/index.asp") Send("{ENTER}") sleep(1000) Global $state=WinWait("Windows Security", "",4) if BitAND($state,8)Then ControlSend("Windows Security", "", "Edit1", "admin") ControlSend("Windows Security", "", "Edit1", "{TAB}") Sleep(500) ControlSend("Windows Security", "", "Edit2","admin") ControlSend("Windows Security", "", "Edit2","{TAB}") Sleep(500) ControlSend("Windows Security", "", "DirectUIHWND1","{TAB}") ControlSend("Windows Security", "", "OK","{ENTER}") EndIf Sleep(10000) Global $oIE=_IECreate("http://192.168.1.1/Upgrade.asp") Global $file= _IEGetObjByName($oIE,"file") _IEFormElementSetValue($file,$EXCEL1) sleep(1000) also the browse button java script code <TR><script>draw_table(SUBFUN,"")</script> <TD colspan=2 class=FUNNAME1> <script>Capture(fwupgrade.upgradefile)</script>: <INPUT type=file name=file size="26" ></TD></TR> <TR><script>draw_table(SUBFUN,"")</script> pls any body replay me
somdcomputerguy Posted June 29, 2013 Posted June 29, 2013 (edited) Make the init dir parameter like this @desktopdir & "" edit: actually that probably won't help, as this FileOpenDialog("Open a file", @desktopdir, "All file (*.*)") works fine for me. Edited June 29, 2013 by somdcomputerguy - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change.
murali33 Posted June 29, 2013 Author Posted June 29, 2013 (edited) input type=file how to choose the file hi somdcomputerguy its not working Edited June 29, 2013 by murali33
abberration Posted June 29, 2013 Posted June 29, 2013 #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $Form1 = GUICreate("", 461, 69, 192, 124) $Button1 = GUICtrlCreateButton("No Path Yet", 32, 16, 403, 25) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 $sPath = FileOpenDialog("Open a file", @desktopdir, "All file (*.*)") GUICtrlSetData($Button1, $sPath) EndSwitch WEnd Easy MP3 | Software Installer | Password Manager
murali33 Posted July 4, 2013 Author Posted July 4, 2013 hai abberration i want set the file path to browse button in the below code <TR><script>draw_table(SUBFUN,"")</script> <TD colspan=2 class=FUNNAME1> <script>Capture(fwupgrade.upgradefile)</script>: <INPUT type=file name=file size="26" ></TD></TR> <TR><script>draw_table(SUBFUN,"")</script> replay me
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