I have created a simple script which creates a dialog box, and compiled it to an .exe
When I run the .exe there's no icon for the application on the taskbar.
How do I make an icon appear on the taskbar so the application can be selected when it's hidden behind another window ?
Thanks
The default behavior of a compiled script is to display its icon on the the Task Bar. You would need to do something in your script to prevent the icon from displaying. For example, have a call to WinHide("").
It's not a massive script (and I'm a beginner so please don't rip me to shreds too much).
If %param0% == 0
MyDebug = @FALSE
Else
MyDebug = @TRUE
EndIf
;Read the dialog title into a variable
Title = IniReadPvt("Main", "Title", "Application Launcher", ".\AppLauncher.ini")
;Read all the entries in the AppPaths section into an item list
Apps = IniItemizePvt("AppPaths", ".\AppLauncher.ini")
NumberApps=ItemCount(Apps, @TAB)/3
AppName=ArrDimension(NumberApps+1)
AppPath=ArrDimension(NumberApps+1)
AppParm=ArrDimension(NumberApps+1)
;Convert item list into 3 arrays (one each for Name, Path and Parameter
Idx = 1
For n = 1 to ItemCount(Apps, @TAB)
Temp = StrTrim(Itemextract(n,Apps,@TAB))
AppName[Idx] = IniReadPvt("AppPaths", Temp, "", ".\AppLauncher.ini")
n = n + 1
Temp = StrTrim(Itemextract(n,Apps,@TAB))
AppPath[Idx] = IniReadPvt("AppPaths", Temp, "", ".\AppLauncher.ini")
n = n + 1
Temp = StrTrim(Itemextract(n,Apps,@TAB))
AppParm[Idx] = IniReadPvt("AppPaths", Temp, "", ".\AppLauncher.ini")
Idx = Idx + 1
Next n
If MyDebug == @TRUE
For Idx = 1 to NumberApps
a = AppName[Idx]
b = AppPath[Idx]
c = AppParm[Idx]
Message("Debug", "Application Selected: Name='%a%', Path='%b%', Parameter='%c%'")
Next Idx
EndIf
MyDialogFormat=`WWWDLGED,6.1`
MyDialogCaption=`%Title%`
MyDialogX=9999
MyDialogY=9999
MyDialogWidth=160
MyDialogHeight=(020*%NumberApps%)+035
MyDialogNumControls=%NumberApps%+1
MyDialogProcedure=`DEFAULT`
MyDialogFont=`DEFAULT`
MyDialogTextColor=`DEFAULT`
MyDialogBackground=`DEFAULT,DEFAULT`
MyDialogConfig=0
;Create the dialog box pushbuttons
for Idx = 1 to NumberApps
Control = StrFixLeft(Idx,"0",3)
y = 10 + ((Idx - 1)*20)
Label = AppName[Idx]
MyDialog%Control%=`010,%y%,140,014,PUSHBUTTON,DEFAULT,"%label%",%Idx%,%Idx%,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
Next Idx
;Create the EXIT\LOGOFF button
Control = StrFixLeft(Idx,"0",3)
y = 10 + ((Idx - 1)*20)
MyDialog%Control%=`060,%y%,040,014,PUSHBUTTON,DEFAULT,"EXIT\LOGOFF",%Idx%,%Idx%,DEFAULT,DEFAULT,DEFAULT,DEFAULT`
;Display the dialog
:DisplayDialog
ButtonPushed = Dialog("MyDialog",1)
;If last button pushed, then that's Exit\Logoff
If StrFixLeft(ButtonPushed,"0",3) == %Control% then Goto TheEnd
;Execute the selected application with selected parameter
RunMe = AppPath[ButtonPushed]
RunMeParm = AppParm[ButtonPushed]
If MyDebug == @TRUE then Message("Debug", "Executing %RunMe% %RunMeParm%")
Run("%RunMe%", "%RunMeParm%")
;Redisplay the dialog for the next selection
Goto DisplayDialog
:TheEnd
If MyDebug == @TRUE
Message("Test Mode", "You would now be logged off")
Else
Run("Logoff", "/v")
EndIf
Exit
Check your compiler settings. Make sure the Run script hidden isn't checked...
THANKS :D
Problem solved - so easy when you know how. Cheers