Total newbie help please?

Frogger

Member
Licensed User
Longtime User
I've just downloaded the desktop trial version of Basic4PPC and I've been taking a look and it looks good! But, I have tried the following and always get an error which says "reg is not a known control or object" error when I try to run it. I've added the Registry components if that helps?

B4X:
Sub Globals
   'Declare the global variables here.

End Sub

Sub App_Start
   Form1.Show
   reg.New1
        reg.RootKey(reg.rtCurrentUser)
   HTCSENSEEXIST = reg.GetValue("SOFTWARE\Microsoft\Today\Items\HTC Sense", "Enabled")
End Sub

I know this must be really, really simple to most of you but the last time I did any Basic programming was back on the Amstrad CPC back in the 80s! I was OK at that then but this is a whole different ball game.

:sign0144: Sorry if this question is really stupid! :sign0144:
 

derez

Expert
Licensed User
Longtime User
Have you added the registry.dll and a registry object ? After adding the library (components) press add object under the tools menu and name it reg if you want this name.
 

Frogger

Member
Licensed User
Longtime User
Have you added the registry.dll and a registry object ? After adding the library (components) press add object under the tools menu and name it reg if you want this name.

See, how daft am I? :sign0161:

No, I hadn't done the second part.

Thank you for your help!
 

Frogger

Member
Licensed User
Longtime User
You can try out out libraries tutorial:

Thank you, I will read that!

One more question? In Mortscript if you want to run another external program it's just:

B4X:
run("\Program Files\SomeDirectory\SomeProgram.exe")

How is this done in Basic4PPC? I've looked, but I can't find the equivalent. It's probably somewhere - but I'm missing it!

Thank you.
 

mjcoon

Well-Known Member
Licensed User
...if you want to run another external program... How is this done in Basic4PPC?

From the Help:

Shell
Runs an external program.
Syntax: Shell (Program File, Arguments)
Example:
Shell ("Calc.exe", "")

(But note that this does not tell you when the program completes.)

Mike.
 

Frogger

Member
Licensed User
Longtime User
From the Help:

Shell
Runs an external program.
Syntax: Shell (Program File, Arguments)
Example:
Shell ("Calc.exe", "")

(But note that this does not tell you when the program completes.)

Mike.

Great. Thanks for the help. I was looking for "run" or "execute" or something similar and didn't think of "shell".

Regards.

Steve
 
Top