Hi. My vb6 program launches a program (Acrobat Reader, for example), and then does some stuff to the opened program. When the vb6 program ends, it automacially closes the program that it launched earlier. However, the problem is that if the user closes the program that is launched by the vb6...
I've searched some and found some answers to my own questions at: http://www.michisoft.com/vb/code7.htm
Perhpas this will send me in a new less complicated direction. Thanks for your help once again!
cold25
I've wondered that too, but I don't know any way around it currently. I value the vbs because of the SendKeys command. The vbs opens a scanning program for me and I then send a series of SendKeys to have it automate what I need done.
Does VB6 have a way to send keystrokes in a similar fashion...
Hi. My vb6 program calls a script which does some stuff, then waits for the WshShell.AppActivate "" method to become true. When it does equal true, I want to set a variable in the script to 1 (or some value) and pass it back to the vb6 program that initially launched the script, so it knows that...
Thank you both for your suggestion, comments and links for guidance. I shall examine them all. This is my first time trying to automate a program. The person working who was working on this project prior to me showed me sendkeys about two weeks ago, thought it was the way to go, and that was my...
Hi. I have a VB6 program that when executed, opens a form with a "Go" command button on it, a "File" menu in the upper left (created with menu editor), and the "X" close button in the upper right of the title bar. The thing is, when I click the "Go" button, I want to disable the File menu and...
Hi. My script launches a scanning program and then performs some sendkeys commands and other things, too. My problem is that I need the script to execute its commands only on the program that it launched (the scanning program), and not on other programs or the computer itself, if the user...
I have attempted to include a simple Do While Not loop. It's supposed to keep checking for a modal screent to pop up, until the screen pops up, and then move on. However, the line Do While Not WshShell.AppActivate "HP Scan Picture" keeps causing an error stating "Expected statement." I'm not...
Thanks for your answer. I shall try to set up some sort of loop with AppActivate for now. What is this "autoit" you mentioned, and where might I find out more information about it?
cold25
Hi. The script I'm writing launches a program that performs an action that takes a bit of time. This time can vary, depending on what is selected earlier in the script. After the action is performed, a modal box pops up for the user to decide wether to perform the action again, or quit. I'm...
You were right about the sleep method working. It appears to be working better after increasing the value from 1000 to 5000, to test it. Your help has been of great value to me. Hopefully this will flow smoother now that the script is its own external program, and out of vb6. Thanks again!
cold25
Hi. So you're saying that I should write my script in a .vbs file totally outside of my vb6 program, and then set my cmdButton in the vb6 program to launch it, in a fashion similar to the one which you helped me with yesterday?:
WshShell.Run """C:\Program Files\Hewlett-Packard\Digital...
Hi. I've modified a vb script example from the msdn page to start my own script. When I put it inside my VB6 program and try to run it like this:
Dim WshShell
Dim WScript
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run """C:\Program...
Hey, thanks for your help. The WshShell.Run """C:\Program Files\Adobe\Acrobat 5.0\Reader\AcroRd32.exe""" is working now. I would have never guessed that it just needed a couple extra sets of quotation marks around the path. Would you have any suggestions of any web sites and/or books I could...
Hi. I'm trying to learn vbs and get some basic things to work. I have two main questions right now concerning the script I've written, below:
1. I'm trying to write a simple script in notepad to automate the launching of an exe file (AcroRd32.exe). I've saved the file where the script is...
Hi. Might anyone know why the code I have below stops short, after executing the program Hpqdirec.exe? It does nothing else, unless I click the launch button a second time, and then it doesn't execute all of my sendkey commands. I've just begun learning about vbs & sendkeys so I'm not sure what...
Thanks for your reply. I made a dBASE file using Database Desktop as advised and it opens fine in Excel. I also replaced all the ftInteger parts with ftBCD and put Size := 10; underneath that, however that file won't open in Excel yet. I would like to investigate the differences between the two...
My database program creates .dbf files, which I understand as being DBase files. I can display, edit and save my progress on these new .dbf files on my form's DBGrid. So, this table works fine with my delphi program. What I'm wondering is why is it that Excel gives me the message "This file...
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.