Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
init2 , check if certain constants contain existing paths
#1
I tried to use the init2 function to check if certain constants contain existing paths.
If the paths does not exist, I wanted to generate a basic messagebox.

Example:
I have a constant: "FF" which points to my portable firefox installation.
So if I moved the firefox installation and would boot QM, QM would render a messagebox stating that FF doesn't point to a correct firefox path.

The problem is that the messagebox is displayed twice, see the following testcode (it is rigged so it always displays the messagebox):
Function init2
Trigger @2     Help - how to add the trigger to the macro
Code:
Copy      Help
if(_s!="test") mes("test")

It generates the messagebox but it is rendered twice. In other words, the first time I click "ok" the messagebox is rendered again and I have to click "ok" again.

EDIT:
My current complete init2
Function init2
Trigger @2     Help - how to add the trigger to the macro
Code:
Copy      Help
#compile __CToolTip
#compile "_QM_CUSTOM_CONSTANTS_"
ref WINAPI2 "$qm$\winapi2.txt" 1


How can I correct this?
#2
init2 must not have a trigger. Use either init2 without a trigger or another function with a trigger.
#3
ah! ok!
Thank you!


Forum Jump:


Users browsing this thread: 1 Guest(s)