Jump to content
The simFlight Network Forums

write to macro with VB


Recommended Posts

Hi,

i am using Visual Basic.

example if i wanna write some data to offset like below:

If FSUIPC_Write(offset11, size, VarPtr(value), pSrce) Then
  If FSUIPC_Process(dwResult) Then
  End If
  End If

but could i write a macro with this method?

ini file:

11=;P1,8,CM2:8,0

place in macro:

8=HDG up=RX34a0*X8b90

so what value must replace for offset11?

it is possible or not?

so sorry for busy but i cannot find my answer with search criteria.

best regards

Link to comment
Share on other sites

but could i write a macro with this method?

ini file:

11=;P1,8,CM2:8,0

Not with that ";" in front -- that will stop the parameter being read.

place in macro:

8=HDG up=RX34a0*X8b90

That's a "mouse macro" for calling mouse processing code inside a specific panel module (Gauge). It is nothing to do with FSUIPC offset data.

so what value must replace for offset11?

You cannot write mouse macros, you must generate them for specific panel switches using the facilities as documented!

so sorry for busy but i cannot find my answer with search criteria.

You need to formulate the question more precisely. ;-)

Do you simply want to write a value to an FSUIPC offset as a result of a Button push or Key press? If so, go to the relevant FSUIPC options tab (Buttons or Keys), press your button or key, then scroll down the FS controls lists till you come to the range of "Offset" controls. You'll find there are such added FSUIPC control to write Byte, Word, Dword, Float32 and Float64 values, and also facilities to set or clear bits (OR and AND effectively), and both normal and cyclic increments and decrements. There are even examples in the documentation.

Regards

Pete

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
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.