checkbox issue
Posted: 01 Apr 2017, 03:24
Hi, I'm a complete beginner at AHK. The script below was born out of smartgui, guide reading, trial and error. Until the day before yesterday this script ran flawlessly. And yesterday, just when I wanted to distribute it among my colleagues, I noticed that that the output either reflects or doesn't the state of checkboxes at random. Any help with this will be greatly appreciated.
Code: Select all
; SU Quickpaste
Gui,+AlwaysOnTop
gui, font, s10, Verdana
Gui, Add, Tab2, x42 y20 w390 h310 , SC created | Chasing | PO created
Gui, Add, Edit, vPR x232 y100 w160 h30
Gui, Add, Edit, vSC x232 y170 w160 h30
Gui, Add, Text, x92 y100 w110 h30 , Purchase Request
Gui, Add, Text, x92 y170 w110 h30 , Shopping Cart
Gui, Add, CheckBox, Checked x262 y230 w130 h40 vnotification, PO notification
Gui, Add, Button, default gOk x182 y280 w90 h30 , OK
Gui, Tab, 2
Gui, Add, Text, x142 y150 w90 h30 , Shopping Cart
Gui, Add, Edit, vSC2 x252 y150 w120 h30
Gui, Add, CheckBox, x302 y240 w100 h30 vUrgent, Urgent
Gui, Add, Button, default gOk2 x182 y280 w90 h30 , OK
Gui, Tab, 3
Gui, Add, Text, x92 y100 w100 h30 , Purchase Request
Gui, Add, Text, x92 y170 w100 h30 , Purchase Order
Gui, Add, Edit, vPR2 x232 y100 w150 h30
Gui, Add, Edit, vPO x232 y170 w150 h30
Gui, Add, CheckBox, Checked x272 y240 w100 h30 vGRN, GRN notification
Gui, Add, Button, default gOk3 x182 y280 w90 h30 , OK
Gui, Show, x226 y116 h383 w483, SU Quickpaste
Return
ok:
{
Gui, submit,
clipboard = text (%PR%) text %SC%
if notification = 1
clipboard =
clipboard = some other text (%PR%) some other text %SC%.some other text.
GuiControl,,PR,
GuiControl,,SC,
Gui Minimize
}
return
ok2:
{
Gui, submit,
clipboard = text %SC2% text.
if Urgent = 1
clipboard =
clipboard = some other text %SC2% some other text.
GuiControl,,SC2,
Gui Minimize
}
return
ok3:
{
Gui, submit,
clipboard = text (%PR2%) text %PO%.
if GRN = 1
clipboard =
clipboard = some other text (%PR2%) some other text.
GuiControl,,PR2,
GuiControl,,PO,
Gui Minimize
}
return
GuiClose:
ExitApp
GuiEscape:
ExitApp