Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
test macro file => compiled version .exe takes argument
#1
Hello,

My apologies for the difficult description for a "simple problem".
I am currently finishing up my first macro, but I have the following "problem".

The compiled macro (.exe) uses an argument which I provide in a windows shortcut.
I have the compiled executable "winlauncher.exe"
And it gets a parameter in the form of a path to a textfile and a extra string which are provided in the windows shortcut of the .exe file.
The shortcut would look something like this:
Code:
Copy      Help
c:\winlauncher.exe winlist=c:\winlist.txt config=config2
executable => c:\winlauncher.exe
path to a text file => winlist=c:\winlist.txt
extra string => config=config2

I currently make a test variable "test_command" and fill it with the arguments:
path to a text file => winlist=c:\winlist.txt
extra string => config=config2

So it looks something like this
Code:
Copy      Help
str test_command="winlist=c:\winlist.txt config=config2"

Then I create a piece of code that checks if the current filename is "qm"
Macro temp
Code:
Copy      Help
str is_qm.getfilename(ExeFullPath)
if(is_qm="qm")
,;...actions using the "test_command" variable
else
,;...actions using the predifined "_command" variable

Based on the code above I decide to use: "_command" or my test command variable "test_command"

Is there a better way to approach this?
Or is the method I am using fine?

Edit:
I now have another "major" problem, the function "RunTextAsFunction" can't be used in a macro that you want to compile to exe
Code:
Copy      Help
Error in RunTextAsFunction:  cannot be used in exe.

its a simple key function

Code:
Copy      Help
RunTextAsFunction F"key {vwinkey}"

The macro works, but compiling to .exe is not possible


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)