is there a way to copy a file? for example "C:\test.txt" and then paste the file path somewhere else? will it stay in memory? I've tried filetocopy "C:\test.txt" but instead of pasting the file path it pastes the first line of the file??? Help please
I create a text file in Procomm, open Internet explorer and sendkeystr the file name (including path) in a field. But what's happening is that when sendkeystr types the file it's not all complete. for example it would type L:\Document\te instead of L:\Document\test.txt, it never types the file name complete. Of course i'm using winfocus for the browser, below is part of the code. Any ideas?
while not feof 2
fgets 2 sNLine
strlen sNLine iLen
lLen = iLen
if strfind sNLine sNAccnt iNPos ;get naples account number
;usermsg "%s" sNAccnt
substr sNCheck sNLine iNPos+14 10 ;read next 10 characters for check number
sNCheck = StripSpaces(sNCheck)
;usermsg "%s" sNCheck
substr sNAmount sNLine iNPos+25 10 ;read next 10 characters for check amount
sNAmount = StripSpaces(sNAmount)
;usermsg "%s" sNAmount
substr sNDate sNLine iNPos+36 8 ;read next 8 characters for check date
sNDate = StripSpaces(sNDate)
;usermsg "%s" sNDate
substr sNVoid sNLine iNPos+45 1 ;read next 1 character to check if it is a "V" for void check or blank for good check
;sNVoid = StripSpaces(sNVoid) ;do not stripspaces since of not a void check need to leave blank.
;usermsg "%s" sNVoid
substr sFiller30 sNLine iNPos+46 30 ;read next 30 characters for check filler
sFiller30 = StripSpaces(sFiller30)
;usermsg "%s" sFiller30
substr sFiller8 sNLine iNPos+77 8 ;read next 8 characters for check filler
sFiller8 = StripSpaces(sFiller8)
;usermsg "%s" sFiller8
if isfile sNFileName ;if file for naples exists write to file
finsblock 6 80
strfmt sNOutPut "%s%s%s%s%s%s%s" sNAccnt sNCheck sNAmount sNDate sNVoid sFiller30 sFiller8 ;output to file
strreplace sNOutPut "`n" "" ;strip New line
strreplace sNOutPut "`r" "" ;strip Carriage return
fputs 6 sNOutPut
endif
endif
endwhile
fclose 2
if isfile sNFileName
fclose 6
endif
;---------------------------------- END OF NAPLES FILE CREAION -----------------------------------------------------------------
pause 3
;--------------- from IE ----------------------------------------------------------------------
run OpenIE TaskId ;open internet explorer
winactivate hWin ;make internet explorer active
winfocus hWin ;set focus on ie
winmaximize hWin ;maximize ie
pause 2
sendkey ALT 'F' ;send ALT F to go down to Open
pause 2
sendvkey 0x28 ;down arrow
pause 1
;------------- disable below when installed in server,only need 1ea. down arrow key -------------------
sendvkey 0x28 ;down arrow
pause 1
;------------------------------------------------------------------------------------------------------
sendvkey 0x0D ;enter to open Open dialog box
pause 1
sendkeystr WellsFargo ;enter webpage to open
pause 1
sendvkey 0x0D ;click Ok
pause 5
sendvkey 0x0D ;for test page only
pause 5
sendkeystr User ;enter user name
pause 5
sendvkey 0x09 ;tab to go to password box
pause 5
sendkeystr Passwd ;enter password
pause 5
sendvkey 0x0D ;click enter after passord entered
pause 5
;---------------------------------------------------------------------------------------------------------------
if isfile sNFileName
pause 5
usermsg "File Name is: %s" sNFileName
pause 3
sendkeystr sNFileName ======> here's where the file is typed in the field of the webpage.
;cliptofile TEXT sNFileName
pause 10
;sendkey CTRL 'V'
;pause 5
sendvkey 0x0D
pause 10
sendvkey 0x0D
endif
Hi everyone, i'm using strtoclip to copy the file name and then sendkey CTRL 'V' to paste file name and seems to be working fine. Thank you for all your help.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.