Jump to content

FOXPRO


Recommended Posts

  • 2 years later...

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
Link to comment
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...
Link to comment
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

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
Link to comment
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
Link to comment
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.
Link to comment
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
Link to comment
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...
Link to comment
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
Link to comment
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...

Link to comment
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....

Link to comment
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
Link to comment
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")
Link to comment
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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...