Portion of Autoexec script prompts user to load the Calculator after login.
Once loaded {ALT-TAB} can access and keyboard or mouse can be used.
NOTE: calc.exe was copied to A5 program directory or can be kept with the application files.
***
Button on global Goto Toolbar (like AlphaSports Navigator toolbar)
script_play("Calculator")
***
Global script: "Calculator"
Once loaded {ALT-TAB} can access and keyboard or mouse can be used.
NOTE: calc.exe was copied to A5 program directory or can be kept with the application files.
'Displays a v6 message box (style:'Yes, No Buttons', image: 'Information symbol', id: 'MsgLoadCalculator').
DIM vn_Msg_result as N
DIM vl_Msg_YES_Button as L
DIM vl_Msg_NO_Button as L
vl_Msg_YES_Button = .F.
vl_Msg_NO_Button = .F.
vc_title = "Load Calculator"
'For v4.5 omit the text delimiters and use quotes
vc_msg_text = <<%text% Do you want to load the pop up calculator now?
%text%
vn_Msg_result=ui_msg_box(vc_title,vc_msg_text,UI_YES_NO+\ UI_FIRST_BUTTON_DEFAULT+ UI_INFORMATION_SYMBOL)
'Test to see which button on the message box was pressed....
SELECT
CASE vn_Msg_result = UI_YES_SELECTED
dim global handle as n
sys_shell("c:\a5v6\calc.exe",1)
handle = sys_id_get("Calculator")
CASE vn_Msg_result = UI_NO_SELECTED
END SELECT
'
'Load Main Menu and Goto Toolbar
frm = form.load("Main Menu")
frm.show()
frm.activate()
end
DIM vn_Msg_result as N
DIM vl_Msg_YES_Button as L
DIM vl_Msg_NO_Button as L
vl_Msg_YES_Button = .F.
vl_Msg_NO_Button = .F.
vc_title = "Load Calculator"
'For v4.5 omit the text delimiters and use quotes
vc_msg_text = <<%text% Do you want to load the pop up calculator now?
%text%
vn_Msg_result=ui_msg_box(vc_title,vc_msg_text,UI_YES_NO+\ UI_FIRST_BUTTON_DEFAULT+ UI_INFORMATION_SYMBOL)
'Test to see which button on the message box was pressed....
SELECT
CASE vn_Msg_result = UI_YES_SELECTED
dim global handle as n
sys_shell("c:\a5v6\calc.exe",1)
handle = sys_id_get("Calculator")
CASE vn_Msg_result = UI_NO_SELECTED
END SELECT
'
'Load Main Menu and Goto Toolbar
frm = form.load("Main Menu")
frm.show()
frm.activate()
end
Button on global Goto Toolbar (like AlphaSports Navigator toolbar)
script_play("Calculator")
***
Global script: "Calculator"
'XBasic Load windows calculator else make active
dim global handle as n
dim get_handle as n
on error goto LOADIT
get_handle = sys_id_get("Calculator")
if get_handle = handle then
sys_focus_put("Calculator")
else
goto LOADIT
end if
end
LOADIT:
sys_shell("c:\a5v6\calc.exe",1)
handle=sys_id_get("Calculator")
dim global handle as n
dim get_handle as n
on error goto LOADIT
get_handle = sys_id_get("Calculator")
if get_handle = handle then
sys_focus_put("Calculator")
else
goto LOADIT
end if
end
LOADIT:
sys_shell("c:\a5v6\calc.exe",1)
handle=sys_id_get("Calculator")