Sign in to follow this  
Followers 0
uznut

FOXPRO

21 posts in this topic

Has anyone ever tried to use auto it with foxpro? i can't get it to recongize the foxpro window? any suggestions? :D

Share this post


Link to post
Share on other sites



I have the same problem. Any suggestions would be great!! I've been on MSDN for about an hour and no luck. I've used Windows Control Grabber (an autoit app) and no dice with that either. I'm wanting to target specific items (eg. edit areas,checkboxes, radios, etc.) and send commands to them. However, I can't seem to "see" them with autoIt.


A decision is a powerful thing

Share this post


Link to post
Share on other sites

I have the same problem. Any suggestions would be great!! I've been on MSDN for about an hour and no luck. I've used Windows Control Grabber (an autoit app) and no dice with that either. I'm wanting to target specific items (eg. edit areas,checkboxes, radios, etc.) and send commands to them. However, I can't seem to "see" them with autoIt.

It looks like COM is the way to go on this one, I'm looking for a little more documentation and I'll paste a link in here...

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

thank you thank you!! I don't really know how to use COM. I'll start researching though :whistle: Yeah, any documentation links would be AWESOME!

thanks again


A decision is a powerful thing

Share this post


Link to post
Share on other sites

Yes, COM definitely is the way to go....

here is some documentation on the VFP objects...

and some other potentially useful info


1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

Dude!~ you are a master searcher!

thank you very much!!

Off to learn COM! :whistle:


A decision is a powerful thing

Share this post


Link to post
Share on other sites

Dude!~ you are a master searcher!

thank you very much!!

Off to learn COM! :whistle:

Glad i could help.

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

Cameronsdad,

I can't figure out what the Object Name is for FoxPro. ObjCreate("foxpronamehere")

I've been looking through the AUI help file and the link you posted, but I must be missing something


A decision is a powerful thing

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

Cameronsdad,

I can't figure out what the Object Name is for FoxPro. ObjCreate("foxpronamehere")

I've been looking through the AUI help file and the link you posted, but I must be missing something

actually, in autoit syntax it would be like:

$oMyFP = ObjCreate("","VisualFoxPro.Application")
If IsObj($oMyFP) Then
Msgbox(0,"Success!","VFP Object created")
Else
Msgbox(0,"Error!","Failed to create VFP object")
EndIf

***edit***

added code to say success or fail...

Edited by cameronsdad

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

Cameronsdad, thanks so much for the great start!! The script example above is wonderful! I found this (http://support.microsoft.com/kb/122244) maybe it will be helpful for someone out there.


A decision is a powerful thing

Share this post


Link to post
Share on other sites

I wouldn't be asking if I haven't already spent time looking, but could someone give me a wink&nudge as to where the a examples are of controlling VFoxPro objects.

Cameronsdad, for some reason I'm missing something :whistle: even in light of your awesome starting places! I tried the following

$oMyFP = ObjCreate("VisualFoxPro.Application")

$oMyFPControl = $oMyFP.EditBox
if not IsObj($oMyFPControl) then
    Msgbox(0,"Error","$oMyFPControl is not an Object.")
else
    Msgbox(0,"Error","Successfully are listening.")
endif

I know the know the version I'm using is 6.0 but the documentation on that is lax and the backwards-compatible script cannot be written in AUI because of syntax problems.

ok off to more reading and testing.


A decision is a powerful thing

Share this post


Link to post
Share on other sites

I wouldn't be asking if I haven't already spent time looking, but could someone give me a wink&nudge as to where the a examples are of controlling VFoxPro objects.

Cameronsdad, for some reason I'm missing something :whistle: even in light of your awesome starting places! I tried the following

$oMyFP = ObjCreate("VisualFoxPro.Application")

$oMyFPControl = $oMyFP.EditBox
if not IsObj($oMyFPControl) then
    Msgbox(0,"Error","$oMyFPControl is not an Object.")
else
    Msgbox(0,"Error","Successfully are listening.")
endif

I know the know the version I'm using is 6.0 but the documentation on that is lax and the backwards-compatible script cannot be written in AUI because of syntax problems.

ok off to more reading and testing.

you're probably going to have to create the edit box first... i don't have VFP here at work, and i'm kind of in the middle of a project, but i will get something together for you on here today.

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

oh wow! your rock! I'd appreciate it, but really no worries though mate. You've helped point me in the right direction already. I'm just wanting to see some good examples somewhere because what I've tried doesn't work :whistle:

This COM stuff totally is cool.

Thanks again!! :P


A decision is a powerful thing

Share this post


Link to post
Share on other sites

oh wow! your rock! I'd appreciate it, but really no worries though mate. You've helped point me in the right direction already. I'm just wanting to see some good examples somewhere because what I've tried doesn't work :whistle:

This COM stuff totally is cool.

Thanks again!! :P

no problem, i'm glad to help, especially when i see someone trying to help themself. i should be at a stopping point on my project in the next hour or so, and then i can jump into this...

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

I'm excited and yeah I know what you mean. I really believe you've got to actually learn what you want to do in general - enrichment. "How sad it is that in this dark age we've had all of our seeking done for us by our teachers." - AWTozer. (man I could go on about that one :whistle: )

I want to understand and know the reasons why. A question is a quest. I'm excited to journey even in the world of understand scripting. I'm weird :P and just get a kick out of the journey, exploration, and understanding.

Thanks and I'm looking forward to anything! :D


A decision is a powerful thing

Share this post


Link to post
Share on other sites

I'm excited and yeah I know what you mean. I really believe you've got to actually learn what you want to do in general - enrichment. "How sad it is that in this dark age we've had all of our seeking done for us by our teachers." - AWTozer. (man I could go on about that one :whistle: )

I want to understand and know the reasons why. A question is a quest. I'm excited to journey even in the world of understand scripting. I'm weird :P and just get a kick out of the journey, exploration, and understanding.

Thanks and I'm looking forward to anything! :D

my attitude is very similar. two websites you should check out, because they'll give you a chance to really learn, and have fun doing it:

hackquest.de

and

arcanum.co.nz

good stuff. i play around on them sometimes still, whenever i start a new language, i'll go do some challenges with the new language to give me a direction to guide my learning, and everything that i pick up doing the challenges with the new language makes learning more with the language that much easier...


1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

Container Hierarchy

Object and Member arrays

the examples given on those links are for if you were working directly within VFP. you have to make some adjustments(not much though) to use those examples for AutoIT

example...their code for creating an array of command buttons is:

DIMENSION MyArray[5]

FOR x = 1 TO 5

MyArray[x] = CREATEOBJECT("CommandButton")

ENDFOR

in AutoIT it would be something like....

Dim $oMyVFP,$oMyArray[5]
$oMyVFP = ObjCreate("","VisualFoxPro.Application")
For $x = 1 to 5
$oMyArray[$x] = $oMyVFP.CREATEOBJECT("CommandButton")
Next

let me know if that works....


1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

Sweet links! Both the sites you posted and the MSDN pages. Lots to explore in both cases :whistle:

As for the script. It doesn't seem to work.

I get the following error

I:\SAI\Auto-It files\Experiments\COM with VFP.au3 (20) : ==> Variable must be of type "Object".: 
$oMyArray[$x] = $oMyVFP.CREATEOBJECT("CommandButton") 
$oMyArray[$x] = $oMyVFP^ ERROR

Weird

I even opened a VFP program (specifically the one I'm hoping to interface with AUI).

Thanks!


A decision is a powerful thing

Share this post


Link to post
Share on other sites

Sweet links! Both the sites you posted and the MSDN pages. Lots to explore in both cases :whistle:

As for the script. It doesn't seem to work.

I get the following error

I:\SAI\Auto-It files\Experiments\COM with VFP.au3 (20) : ==> Variable must be of type "Object".: 
$oMyArray[$x] = $oMyVFP.CREATEOBJECT("CommandButton") 
$oMyArray[$x] = $oMyVFP^ ERROR

Weird

I even opened a VFP program (specifically the one I'm hoping to interface with AUI).

Thanks!

hm... try removing the loop and just creating a single commandbutton.... like:

$oMyButton = $oMyVFP.CREATEOBJECT("CommandButton")

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

Sweet links! Both the sites you posted and the MSDN pages. Lots to explore in both cases :whistle:

As for the script. It doesn't seem to work.

I get the following error

I:\SAI\Auto-It files\Experiments\COM with VFP.au3 (20) : ==> Variable must be of type "Object".: 
$oMyArray[$x] = $oMyVFP.CREATEOBJECT("CommandButton") 
$oMyArray[$x] = $oMyVFP^ ERROR

Weird

I even opened a VFP program (specifically the one I'm hoping to interface with AUI).

Thanks!

oh yeah, Arcanum is a better site for just practicing with a new language, because you can solve most of their puzzles with any language, alot of the stuff on hackquest you're kind of limited to what you can use. there are alot more challenge sites listed at hackergames.net if you like those, and most of them have IRC channels on hackergames.net also, so you can discuss with other people if you need a nudge over there

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

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