Sign in to follow this  
Followers 0
nevermind

Foxpro help required.

6 posts in this topic

#1 ·  Posted (edited)

can we run autoit scripts with foxpro for windows? something like this.

1) open cmd.exe. run a few dos commands.

2) run foxprow.exe. this is something like dos based gui.

3) issue a few commands in foxpro software.

4) exit foxprow.exe

5) run more dos commands

6) close cmd

thanks for help

Edited by nevermind

Share this post


Link to post
Share on other sites



can we run autoit scripts with foxpro for windows? something like this.

thanks for help

What version of Foxpro are you running?

You say "2) run foxprow.exe. this is something like dos based gui".

So I'm guessing it's an old(er) version?

Share this post


Link to post
Share on other sites

its version 2.6

Share this post


Link to post
Share on other sites

its version 2.6

Wow, 2.6 gives "Divide by Zero" errors when run on a modern CPU; I had to use a CPU throttling utility to get the program to launch at all.

But, the Foxpro window and its controls are exposed to Au3Info tool, so scripting it isn't a problem:

Opt("SendKeyDelay",0)
Run("C:\FPW26\FOXPROW.EXE")
WinWait("Microsoft FoxPro", "Command")
WinActivate("Microsoft FoxPro", "Command")
WinWaitActive("Microsoft FoxPro", "Command")
Sleep(500)
$hwndFpCmdWin = ControlGetHandle("Microsoft FoxPro","","[CLASS:Fox_000017161; INSTANCE:3]")
ControlSend("Microsoft FoxPro", "Command",$hwndFpCmdWin,"CLEAR{ENTER}")
ControlSend("Microsoft FoxPro", "Command",$hwndFpCmdWin,"?sys(2003){ENTER}")
ControlSend("Microsoft FoxPro", "Command",$hwndFpCmdWin,"?sys(3){ENTER}")
ControlSend("Microsoft FoxPro", "Command",$hwndFpCmdWin,"?DATE(){ENTER}")
Sleep(500)
ControlSend("Microsoft FoxPro", "Command", $hwndFpCmdWin,"QUIT{ENTER}")

Share this post


Link to post
Share on other sites

thanks for you help. that was very useful. i just had one more question but its not very autoit related which is.

can i perform steps 2, 3 and 4 all in one dos command? i.e open foxprow.exe, issue commands and close foxprow.exe.

thanks again.

Share this post


Link to post
Share on other sites

can i perform steps 2, 3 and 4 all in one dos command? i.e open foxprow.exe, issue commands and close foxprow.exe.

Ehmmm... why don't you just create a Foxpro program with your required Foxpro commands, compile it in Foxpro, and then call that executable from AutoIt with Run() or RunWait()?

Or are they wildly different commands to be executed each and every time?

If you can give me an idea of what you're using the Foxpro commands to do, I might be able to offer more insight.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0