Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dialog2 ?
#1
hi i want to make my macro an EXE
so when i do that how do i make a function run at start of the exe
the dialog code is below, and the function i want to run is called "Time2"
let me know if u have any ideas

\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages

BEGIN DIALOG
0 "" 0x90C80A44 0x100 0 0 223 135 "Dialog"
1 Button 0x54030001 0x4 110 116 48 14 "OK"
2 Button 0x54030000 0x4 170 116 48 14 "Cancel"
3 Static 0x54000000 0x0 2 8 56 12 "Time Started-->"
4 Edit 0x54030080 0x200 64 8 96 14 ""
6 Button 0x54032000 0x0 4 112 48 14 "Reboot"
5 Button 0x54020007 0x0 0 0 172 30 ""
END DIALOG
DIALOG EDITOR: "" 0x2030005 "" "" ""


if(!ShowDialog("Dialog2" &Dialog2)) ret


ret
messages
sel message
case WM_INITDIALOG
case WM_DESTROY
case WM_COMMAND goto messages2
ret
messages2
sel wParam
case IDOK
case IDCANCEL
ret 1
#2
change the first edit(Main) of the make exe dialog to the name of the function you want to run on startup eg. Time2.
#3
thats not working i tryed that but when i make it exe and run it it says error somehting not found
#4
did u put all the function u want in the exe in 1 folder? then click on that folder.
#5
aint there a way i just just like put the mac in the dialog like
case (EXAMPLE) mac "Time2"
or somehting and have it run at startup?

i tryed what u said but i coulent get it
#6
Lets say you have macro MACRO and function FUNCTION.
MACRO is set as Main in Make Exe dialog. It starts when the program starts.
If you want to run the function in separate thread when the program starts, use mac at the beginning of the macro.

mac "FUNCTION"

Note that when MACRO ends, the program also ends. The macro probably must wait until FUNCTION ends.
For example, it can wait using thread handle:

int ht=mac("FUNCTION")
wait 0 H ht

Or use IsThreadRunning in macro.
#7
it is a dialog so in order 2 make the dialog work i need Dialog4 to be in the main box on make exe other wise i get an error
#8
Then make exe from the function, and show dialog in it.

Function Time2:
if(!ShowDialog("Dialog2" &Dialog2)) ret


Forum Jump:


Users browsing this thread: 2 Guest(s)