PSX5Central

Non Gaming Discussions => Off-Topic => Topic started by: Richard on May 14, 2004, 08:27:21 AM

Title: Visual Basic Question...
Post by: Richard on May 14, 2004, 08:27:21 AM
I do not know Visual Basic myself, but believe it is the skill I need to accomplish what I want to be able to do.

Say I want my computer to open “Calculator” obviously I could Start – Run – Calc, but I want a script that sends commands to the GUI so once I execute this script I would see the commands taking place.

One step further would be to add 2+2 once the calculator is open.

Of course I do not want to write a script to add 2+2, but to perform other tasks.

What I want it a program that “Records” my actions so that I could place these scripts in task scheduler.

For example: in IE 6 I want to open Internet Options – Delete Cookies – Delete Files – Clear History.  Then select the “Content” tab Clear SSL State – AutoComplete – Clear Forms – Clear Passwords.

I then could execute and the script would do this for me.

Is there a program out there that does this?  Like when I click the start button what is actually happening in the background?

Thank you for your time.
Title: Visual Basic Question...
Post by: PS2_-'_'-_PS2 on May 14, 2004, 02:44:51 PM
Dim ReturnValue, I
ReturnValue = Shell("calc.exe", 1)   \' Run Calculator.
AppActivate ReturnValue    \' Activate the Calculator.
For I = 1 To 100   \' Set up counting loop.
   SendKeys I & "{+}", True   \' Send keystrokes to Calculator
Next I   \' to add each value of I.
SendKeys "=", True   \' Get grand total.
SendKeys "%{F4}", True   \' Send ALT+F4 to close Calculator.






ReturnValue = Shell("calc.exe", 1)  - u can change "calc.exe" to "notepad.exe" etc



I think the SendKeys command is what u r looking for although there may be something better.

To record things then i guess u could use a .dat file - there are tutorials on using dat files although i could post somehting if i have time

I had some fun on the last day of my computing class with this command...