Jump to content

your opinion on GUI difficulty


Recommended Posts

hello auiters,

i want to get your input before i start this project. i work for a small printing company and i want to create a GUI that will allow our idiot employees to order supplies (toner, paper, binding strips, staples etc) in this fashion:

open the program>

click product from list of options>

select product details from list of options>

enter employee name/PO#>

review/print invoice>

send order to whatever company* >

*we use over 20 suppliers, and the order method varies. but im confident i can write something for each if i can get the order details into an array.

dialog box "would you like to order more?">

restart or quit

desired features:

and i want it to work like an installer (.MSI) in that you must click next after each step.

i want to have part numbers, supplier emails and login usernames/passwords for websites hard coded into the program (but having them all in a config file would be better)

having a password feature would be nice and ive seen code floating around for that.

heres my questions:

1. is this feasible to do with the GUI controls or should i just use msgbox?

2. is there already some source floating around that does something similar to this i could fiddle with?

3. ive never used the GUI controls before, although i have used autoit for a couple years and im comfortable with the language (the documentation is amazing). if you had to rate the difficulty on this from 1-10..? i want to see if i can get paid extra for creating this (student budgets sucks) and having an ETA before i purpose the idea would be great.

<--a good way to start you day
Link to comment
Share on other sites

Fairly simple a straight forward GUI. You may also want to take a look at including an SQLite database to keep track of normal items and to do your order tracking.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

take a look at including an SQLite database to keep track of normal items and to do your order tracking.

thanks for that!

thanks zedna, but i think you're kinda missing what i need. im more concerned with the guts then the wallpaper. and i want it to be like an installer in the sense that it asks you a question, then moves to another screen, basically surrounding the whole program in a loop.

<--a good way to start you day
Link to comment
Share on other sites

I wrote you a quick script (Not complete) I think it should be well more than enough to get you started :D

If you have any questions/need further help then PM me as I probably will forget to check this often ^^;

Code:

#include <Array.au3>
#include <GUIConstantsEx.au3>
Opt("GUIOnEventMode", 1)
Global $ProductListBox, $Gui1, $Gui2
$Products = IniReadSection("Products.ini", "Product")
If @error Then
    MsgBox(48, "Error", "An error has occured!" & @CR & "There was no INI file to load." & @CR & "Please speak with <Name> to fix this problem!")
Exit
Else
_CreateGUI()
EndIf
Func _CreateGUI()
$Gui1 = GuiCreate("Supply Order Form", 600,500)
GUISetOnEvent($GUI_EVENT_CLOSE, "_Close")
$ProductListBox = GuiCtrlCreateList("",200,80,200,300)
For $i = 1 To $Products[0][0]
  GuiCtrlSetData($ProductListBox, $Products[$i][0])
Next
GuiCtrlCreateLabel("Please select a product to order", 160,400,350,30)
GuiCtrlSetFont(-1,17)
$NextButton1 = GuiCtrlCreateButton("Next", 400,470,80,25)
GUICtrlSetOnEvent($NextButton1, "_Gui2")
$CancelButton = GuiCtrlCreateButton("Cancel", 490,470,80,25)
GUICtrlSetOnEvent($CancelButton, "_Close")
GuiSetState()
EndFunc
Func _Gui2()
$ProductSelection = GuiCtrlRead($ProductListBox)
If $ProductSelection = "" Then
  MsgBox(48, "Error", "Please select a product before proceeding!")
Else
  GuiDelete($Gui1)
  $Gui2 = GuiCreate("Product Details",600,500)
  GUISetOnEvent($GUI_EVENT_CLOSE, "_Close")
  $ProductDetailsListBox = GuiCtrlCreateList("",200,80,200,300)
  $ProductDetails = IniReadSection("Products.ini", "Product")
  For $i = 1 To $ProductDetails[0][0]
   If $ProductDetails[$i][0] = $ProductSelection Then
    $NewProductDetails = IniRead("Products.ini", "Product", $ProductSelection, "Error")
    $NewString = StringSplit($NewProductDetails, ",")
   Else
    Sleep(10)
   EndIf
   Next
   For $i = 1 To $NewString[0]
  GuiCtrlSetData($ProductDetailsListBox, $NewString[$i])
   Next
  $NextButton1 = GuiCtrlCreateButton("Next", 400,470,80,25)
  GUICtrlSetOnEvent($NextButton1, "_EmployeeID")
  $CancelButton = GuiCtrlCreateButton("Cancel", 490,470,80,25)
  GUICtrlSetOnEvent($CancelButton, "_Close")
  GuiSetState()
EndIf
EndFunc
Func _EmployeeID()
$ID = InputBox("Employee ID", "Please enter your employee ID")
$IDList = IniReadSection("EmployeeID.ini", "IDS")
For $i = 1 To $IDList[0][0]
  MsgBox(0, "Test", $IDList[$i][0] & @CR & @CR & $ID)
  If $IDList[$i][0] = $ID Then
   MsgBox(0, "Test", "Welcome!")
   ExitLoop
  Else
   Sleep(10)
  EndIf
  If $i = $IDList[0][0] Then
   MsgBox(0, "Test", "Not Welcome!")
   ExitLoop
  EndIf
  Next
EndFunc
Func _Close()
Exit
EndFunc
While 1
Sleep(10)
WEnd

You WILL have to write your own INI's in order for this to work. I thought this would be best since only your company would know the values.

For testing purposes create the following INI/INI entries.

INI Name:

Products.ini

INI Contents

[Product]

Toner=1,2,3,4

Paper=1,2,3,4

INI Name:

EmployeeID.ini

INI Contents:

[iDS]

Jon=1

Ted=1

Bob=1

I think this ID setup would be useful in more than one way. If say, your employee ID does not grant you access to sending a request form (Say only managers can do it) then you can set the value to either 1 or 0. And then run a If statement and if they do not have a 1 exit the script so they cannot send the invoice.

Once again, hope this helps and let me know what you think/need!

MCR.jpg?t=1286371579

Most recent sig. I made

Quick Launcher W/ Profiles Topic Movie Database Topic & Website | LiveStreamer Pro Website | YouTube Stand-Alone Playlist Manager: Topic | Weather Desktop Widget: Topic | Flash Memory Game: Topic | Volume Control With Mouse / iTunes Hotkeys: Topic | Weather program: Topic | Paws & Tales radio drama podcast mini-player: Topic | Quick Math Calculations: Topic

Link to comment
Share on other sites

Using ini is very simple to get you started, and familiar with what is going on.

But for your end product you should take the database advice, or some other method

even just because ini does not support multi line, which you might need for descriptions etc...

Also, should you want to expand the application (likely) in the future then ini is just not suitable.

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

If you have any questions/need further help then PM me

RogerRabbitsClone,

This doesn't apply to the rest of use on the forum, as generally speaking we prefer to discuss about AutoIt in the forums. To put it simply it helps with those learning AutoIt and using the search button.

As GEOSoft said it's a doable challenge one of which I think you'll be satisfied with after completion.

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...