| Joined: Jan 2003 Posts: 217 Member | Member Joined: Jan 2003 Posts: 217 | Does anyone know how to open apps from vb? | | |
▼ Sponsored Links ▼
▲ Sponsored Links ▲
| | | Joined: Mar 2002 Posts: 599 UGN's Resident Homo | UGN's Resident Homo Joined: Mar 2002 Posts: 599 | i take it to mean you want to be able to open other programs from your program. if so, you use Shell(). for instance, if you wanted to open up notepad you would do Shell("C:\windows\notepad.exe") hope that helps
"It's better to burn out, than to fade away."
| | | | Joined: Jan 2003 Posts: 217 Member | Member Joined: Jan 2003 Posts: 217 | Thanks Mate!!!!!!!!!!!!!!!! thats what i wanted to do!!!!!!! | | | | Joined: Jan 2003 Posts: 217 Member | Member Joined: Jan 2003 Posts: 217 | One more thin how do set parameters eg for ie, how do u make it open ie at a certain website? | | | | Joined: Mar 2002 Posts: 1,273 DollarDNS Owner | DollarDNS Owner Joined: Mar 2002 Posts: 1,273 | Include the commandline parameters in the Shell string like so:
Shell("C:\Program Files\Internet Explorer\iexplore.exe http://serialcoders.sytes.net")
In case there's confusion with commandline arguments and the path you can add double quotes:
Shell("""C:\Program Files\Internet Explorer\iexplore.exe"" http://serialcoders.sytes.net") | | | | Joined: Jan 2003 Posts: 217 Member | Member Joined: Jan 2003 Posts: 217 | Shell (File1.Path & File1.FileName) Why doesn't it work? | | | | Joined: Mar 2002 Posts: 1,273 DollarDNS Owner | DollarDNS Owner Joined: Mar 2002 Posts: 1,273 | I don't know. I have no idea what "File1" is. | | | | Joined: Oct 2003 Posts: 59 Junior Member | Junior Member Joined: Oct 2003 Posts: 59 | can u say..open an app and send keystrokes as default values as well...like sending to a programs log in .to make it an auto login ?
"it is the question ...that drives the answer..." Keep Clicking, Bosky
| | | | Joined: Mar 2002 Posts: 1,273 DollarDNS Owner | DollarDNS Owner Joined: Mar 2002 Posts: 1,273 | yes, but there's easier ways to do that. | | | | Joined: Oct 2003 Posts: 17 Junior Member | Junior Member Joined: Oct 2003 Posts: 17 | Originally posted by NTD .: Shell (File1.Path & File1.FileName) Why doesn't it work? Shell (File1.Path & "\" & File1.FileName) you can always debug.print File1.Path & "\" & File1.FileName and see what its actually outputting... also to send keys: sendkeys "{enter}" or sendkeys "{home}+{end}" sendkeys "abcd" 'Backspace {BS} 'Break {BREAK} 'Caps Lock {CAPSLOCK} 'DELETE {DEL} 'Down Arrow {DOWN} 'END {END} 'ENTER {ENTER} or ~ 'Escape {ESC} 'Help {HELP} 'Home {HOME} 'Insert {INS} 'Left Arrow {LEFT} 'Num Lock {NUMLOCK} 'Page Down {PGDN} 'Page Up {PGUP} 'Print Screen {PRTSC} 'Right Arrow {RIGHT} 'Scroll Lock {SCROLLLOCK} 'Tab {TAB} 'Up arrow {UP} 'F1 - F16 {F1} - {F16} 'Shift + 'Ctrl ^ 'Alt % | | | | Joined: Mar 2002 Posts: 599 UGN's Resident Homo | UGN's Resident Homo Joined: Mar 2002 Posts: 599 | ntd, it should be Shell(file1.path & "\" & file1.filename)
you forgot the backslash in the middle. also, you have to make sure a file is actually selected in the file list box.
"It's better to burn out, than to fade away."
| | | | Joined: Oct 2003 Posts: 17 Junior Member | Junior Member Joined: Oct 2003 Posts: 17 | ahh...isnt that what i just said? o_O | | |
Forums41 Topics33,840 Posts68,858 Members2,176 | Most Online3,253 Jan 13th, 2020 | | | |