 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Mkbailey755
Joined: 20 Aug 2007 Posts: 178
|
Posted: Wed Jul 16, 2008 5:25 am Post subject: Need pop up window from Account edit box |
|
|
I have a basic ticketing system for my job It saves the information that they called in about as well as reason etc.. I have text files for the logs that are created (I.e 00002.txt) I basically want to put in the account number push enter and have the file load in new pop GUI edit box.
| Code: | #NoEnv
Gui, Add, DateTime, x206 y7 w100 h30,
;Edit box for Account number
Gui, Add, Edit, x16 y40 w110 h25 vAccount,
;end edit box
Gui, Add, DropDownList, x16 y70 w110 h400 Choose1 gDDL_Application vLabel, Application||WinXP|Vista|MacOs|I.E|Firefox|Other
Gui, Add, DropDownList, x16 y100 w110 h400 gDDL_Problem vProblem Choose1, Problem,
Gui, Add, Listbox, x136 y40 w200 h110 gLB_Solution vSolution Choose1 +Wrap, Solution
Gui, Add, DropDownList, x16 y150 w110 h200 , Memory Size||128|256|512|768|1024|1280|1536|2048|Other
Gui, Add, DropDownList, x16 y180 w110 h200 , CPU Size||1.0|1.2|1.4|1.8|2.0|2.4|2.6|2.8|3.0|Other
Gui, Add, Radio, x156 y180 w110 h30 vDualCore, Dual Core
Gui, Add, Edit, x16 y210 w300 h160 vEdit +Wrap,
Gui, Add, Button, x16 y400 w300 h30 gLog ,Create Notes
Gui, Show, x144 y306 h450 w343, Notes System
Return
;file read
FileRead, content,%Account%.txt
ControlSetText Text, %content%, Notes System,
Gui, Add, Text, x6 y7 w280 h400 , %Content%
Gui, Show, x535 y167 h416 w289,Account Info
;end file read
DDL_Application:
FormatTime, var2,, MMMM dd yyyy hh:mm:ss
ControlSend,Edit2,%var2%`n,Notes System,
Gui, Submit, NoHide
If IsLabel(Label)
GoSub, %Label%
Return
Vista:
Control, EditPaste, Edit2,Windows Vista`n, Notes System,
GuiControl, , Problem, |Problem||Problem1||Problem2|Problem3|Problem4|Problem5|Problem6|Vista
Return
WinXP:
ControlSend, Edit2,Windows XP`n, Notes System,
GuiControl, , Problem, |Problem||Problem1|Problem2|Problem3|Problem4|Problem5|Problem6|XP
Return
MacOs:
ControlSetText, Edit2, Macintosh`n, Notes System,
GuiControl, , Problem, |Problem||Problem1|Problem2|Problem3|Problem4|Problem5|Problem6|Mac Os
Return
I.E:
ControlSend, Edit2,Inernet Explorer 7/6`n, Notes System,
GuiControl, , Problem, |Problem||Problem1|Problem2|Problem3|Problem4|Problem5|Problem6|I.E
Return
Firefox:
ControlSend, Edit2,Firefox`n, Notes System,
GuiControl, , Problem, |Problem||Problem1|Problem2|Problem3|Problem4|Problem5|Problem6|Firefox
Return
Other:
ControlSend, Edit2,Other`n, Notes System,
GuiControl, ,Other,|Other||Other
Return
DDL_Problem:
Gui, Submit, NoHide
If IsLabel(Label)
GoSub, %Problem%
Return
Problem1:
ControlSend, Edit2,Problem1`n, Notes System,
GuiControl, , Solution, |Solution||Solution1:the quick fox jumped over the lazy dog|Solution2|Solution3|Solution4|Solution5|Solution6|Solution7|Solution8|
return
Problem2:
ControlSend, Edit2,Problem2`n, Notes System,
GuiControl, , Solution, |Solution||Solution1|Solution2|Solution3|Solution4|Solution5|Solution6|Solution7|Solution8|
return
Problem3:
ControlSend, Edit2,Problem3`n, Notes System,
GuiControl, , Solution, |Solution||Solution1|Solution2|Solution3|Solution4|Solution5|Solution6|Solution7|Solution8|
return
Problem4:
ControlSend, Edit2,Problem4`n, Notes System,
GuiControl, , Solution, |Solution||Solution1|Solution2|Solution3|Solution4|Solution5|Solution6|Solution7|Solution8|
return
Problem5:
ControlSend, Edit2,Problem5`n, Notes System,
GuiControl, , Solution, |Solution||Solution1|Solution2|Solution3|Solution4|Solution5|Solution6|Solution7|Solution8|
return
Problem6:
ControlSend, Edit2,Problem6`n, Notes System,
GuiControl, , Solution, |Solution||Solution1|Solution2|Solution3|Solution4|Solution5|Solution6|Solution7|Solution8|
return
LB_Solution:
Gui, Submit, NoHide
If IsLabel(Label)
GuiControlGet, Solution
ControlSend, Edit2,%Solution%`n, Notes System,
return
Log:
ControlGetText, Notes, Edit2, Notes System, ,
FileAppend, %Notes%`n, C:\%Account%.txt
return
GuiClose:
ExitApp |
thanks fr the help |
|
| Back to top |
|
 |
BoBo² Guest
|
Posted: Wed Jul 16, 2008 8:59 am Post subject: |
|
|
| Quote: | | I basically want to put in the account number push enter and have the file load in new pop GUI edit box | Nice to know. So what's the problem?? |
|
| Back to top |
|
 |
Guest
|
Posted: Wed Jul 16, 2008 12:51 pm Post subject: |
|
|
when I try to use the file read command it wont populate I feel like Im missing something and not sure of what it is any help will be appreciated
| Code: | ;Edit box for Account number
Gui, Add, Edit, x16 y40 w110 h25 vAccount,
;end edit box |
| Code: | ;file read
FileRead, content,%Account%.txt
ControlSetText Text, %content%, Notes System,
Gui, Add, Text, x6 y7 w280 h400 , %Content%
Gui, Show, x535 y167 h416 w289,Account Info
;end file read |
here is the code taken from above that im using to populate the Account information |
|
| Back to top |
|
 |
Mkbailey755
Joined: 20 Aug 2007 Posts: 178
|
Posted: Wed Jul 16, 2008 2:46 pm Post subject: |
|
|
must of been real tired last night I forgot my glabel
I'm having problems now with it opening into a new window instead it puts the new code into a new window
| Code: | ;file read
Account:
Keywait Enter, D
IfExist, C:\%account%.txt
FileRead, content,%Account%.txt
Gui, +AlwaysOnTop +Disabled -SysMenu +Owner
Gui, Add, Text, x6 y7 w280 h400 , %Content%
Gui, Show, x535 y167 h416 w289 NoActivate,Account Info
Content =
IfNotExist, C:\%account%.txt
msgbox, Account does not exsist in data base
;end file read |
here the updated version with glabels
entire code
| Code: | #NoEnv
Gui, Add, DateTime, x206 y7 w100 h30,
;Edit box for Account number
Gui, Add, Edit, x16 y40 w110 h25 gAccount,
;end edit box
Gui, Add, DropDownList, x16 y70 w110 h400 Choose1 gDDL_Application vLabel, Application||WinXP|Vista|MacOs|I.E|Firefox|Other
Gui, Add, DropDownList, x16 y100 w110 h400 gDDL_Problem vProblem Choose1, Problem,
Gui, Add, Listbox, x136 y40 w200 h110 gLB_Solution vSolution Choose1 +Wrap, Solution
Gui, Add, DropDownList, x16 y150 w110 h200 , Memory Size||128|256|512|768|1024|1280|1536|2048|Other
Gui, Add, DropDownList, x16 y180 w110 h200 , CPU Size||1.0|1.2|1.4|1.8|2.0|2.4|2.6|2.8|3.0|Other
Gui, Add, Radio, x156 y180 w110 h30 vDualCore, Dual Core
Gui, Add, Edit, x16 y210 w300 h160 vEdit +Wrap,
Gui, Add, Button, x16 y400 w300 h30 gLog ,Create Notes
Gui, Show, x144 y306 h450 w343, Notes System
Return
;file read
Account:
Keywait Enter, D
IfExist, C:\%account%.txt
FileRead, content,%Account%.txt
Gui, +AlwaysOnTop +Disabled -SysMenu +Owner
Gui, Add, Text, x6 y7 w280 h400 , %Content%
Gui, Show, x535 y167 h416 w289 NoActivate,Account Info
Content =
IfNotExist, C:\%account%.txt
msgbox, Account does not exsist in data base
;end file read
DDL_Application:
FormatTime, var2,, MMMM dd yyyy hh:mm:ss
ControlSend,Edit2,%var2%`n,Notes System,
Gui, Submit, NoHide
If IsLabel(Label)
GoSub, %Label%
Return
Vista:
Control, EditPaste, Edit2,Windows Vista`n, Notes System,
GuiControl, , Problem, |Problem||Problem1||Problem2|Problem3|Problem4|Problem5|Problem6|Vista
Return
WinXP:
ControlSend, Edit2,Windows XP`n, Notes System,
GuiControl, , Problem, |Problem||Problem1|Problem2|Problem3|Problem4|Problem5|Problem6|XP
Return
MacOs:
ControlSetText, Edit2, Macintosh`n, Notes System,
GuiControl, , Problem, |Problem||Problem1|Problem2|Problem3|Problem4|Problem5|Problem6|Mac Os
Return
I.E:
ControlSend, Edit2,Inernet Explorer 7/6`n, Notes System,
GuiControl, , Problem, |Problem||Problem1|Problem2|Problem3|Problem4|Problem5|Problem6|I.E
Return
Firefox:
ControlSend, Edit2,Firefox`n, Notes System,
GuiControl, , Problem, |Problem||Problem1|Problem2|Problem3|Problem4|Problem5|Problem6|Firefox
Return
Other:
ControlSend, Edit2,Other`n, Notes System,
GuiControl, ,Other,|Other||Other
Return
DDL_Problem:
Gui, Submit, NoHide
If IsLabel(Label)
GoSub, %Problem%
Return
Problem1:
ControlSend, Edit2,Problem1`n, Notes System,
GuiControl, , Solution, |Solution||Solution1:the quick fox jumped over the lazy dog|Solution2|Solution3|Solution4|Solution5|Solution6|Solution7|Solution8|
return
Problem2:
ControlSend, Edit2,Problem2`n, Notes System,
GuiControl, , Solution, |Solution||Solution1|Solution2|Solution3|Solution4|Solution5|Solution6|Solution7|Solution8|
return
Problem3:
ControlSend, Edit2,Problem3`n, Notes System,
GuiControl, , Solution, |Solution||Solution1|Solution2|Solution3|Solution4|Solution5|Solution6|Solution7|Solution8|
return
Problem4:
ControlSend, Edit2,Problem4`n, Notes System,
GuiControl, , Solution, |Solution||Solution1|Solution2|Solution3|Solution4|Solution5|Solution6|Solution7|Solution8|
return
Problem5:
ControlSend, Edit2,Problem5`n, Notes System,
GuiControl, , Solution, |Solution||Solution1|Solution2|Solution3|Solution4|Solution5|Solution6|Solution7|Solution8|
return
Problem6:
ControlSend, Edit2,Problem6`n, Notes System,
GuiControl, , Solution, |Solution||Solution1|Solution2|Solution3|Solution4|Solution5|Solution6|Solution7|Solution8|
return
LB_Solution:
Gui, Submit, NoHide
If IsLabel(Label)
GuiControlGet, Solution
ControlSend, Edit2,%Solution%`n, Notes System,
return
Log:
ControlGetText, Notes, Edit2, Notes System, ,
FileAppend, %Notes%`n, C:\%Account%.txt
return
GuiClose:
ExitApp |
|
|
| Back to top |
|
 |
Mkbailey755
Joined: 20 Aug 2007 Posts: 178
|
Posted: Thu Jul 17, 2008 1:24 am Post subject: |
|
|
ok finally fix that problem with the two windows the problem is that now variable "account" does not work to load the file
| Code: | #NoEnv
Gui, Add, DateTime, x206 y7 w100 h30,
;Edit box for Account number
Gui, Add, Edit,x16 y40 w110 h25 vAccount gAccount,
;end edit box
Gui, Add, DropDownList, x16 y70 w110 h400 Choose1 gDDL_Application vLabel, Application||WinXP|Vista|MacOs|I.E|Firefox|Other
Gui, Add, DropDownList, x16 y100 w110 h400 gDDL_Problem vProblem Choose1, Problem,
Gui, Add, Listbox, x136 y40 w200 h110 gLB_Solution vSolution Choose1 +Wrap, Solution
Gui, Add, DropDownList, x16 y150 w110 h200 , Memory Size||128|256|512|768|1024|1280|1536|2048|Other
Gui, Add, DropDownList, x16 y180 w110 h200 , CPU Size||1.0|1.2|1.4|1.8|2.0|2.4|2.6|2.8|3.0|Other
Gui, Add, Edit, x16 y210 w300 h160 vEdit +Wrap,
Gui, Add, Button, x16 y400 w300 h30 gLog ,Create Notes
Gui, Show, x144 y306 h450 w343, Notes System
Return
Account:
^1::
msgbox, %Account% |
Any help is appreciated I'm using the gui for the first time in one of my scripts so I need a lil push thank you
this is the line that Im having trouble with thank you
Gui, Add, Edit,x16 y40 w110 h25 vAccount gAccount, |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|