Jump to content

Startup Graphic


Recommended Posts

I've just started playing with AutoIt, and I wanted to do some functions that I couldn't grasp from the Help File. I came on here and was hit with OMG you can do that? So I'm looking to have a PNG pop up when the script starts. I've seen a few scripts to get a PNG to show up, but I'm having trouble grasping which code does what, and can't pull out just the code I need to do this. Then I come to my dilema. I've been trying to store radio buttons as variables (some of which I need to switch to check boxes so I can select multiple) so the script can later type in some text in the proper area. Yet again I'm just not grasping how to do it from the help file. And finally, I'll be making two programs. One for users, and one for myself. The user one I would like it to make a file to store what they input so I can review it before letting it go out onto the data base. is there a way to pull the data out of a document that the first program made so when I review I can hit accept and it will pick up those variables again and put them in the proper fields?

I'm sorry if these have already been asked, but I've searched and searched.

Giggity

Link to comment
Share on other sites

For the PNG Load, Check this thread http:

//www.autoitscript.com/forum/index.ph...mp;#entry513320

For the rest, post what you have so far and indicate where you are having problems - folks here will be more than willing to help out.

I've just started playing with AutoIt, and I wanted to do some functions that I couldn't grasp from the Help File. I came on here and was hit with OMG you can do that? So I'm looking to have a PNG pop up when the script starts. I've seen a few scripts to get a PNG to show up, but I'm having trouble grasping which code does what, and can't pull out just the code I need to do this. Then I come to my dilema. I've been trying to store radio buttons as variables (some of which I need to switch to check boxes so I can select multiple) so the script can later type in some text in the proper area. Yet again I'm just not grasping how to do it from the help file. And finally, I'll be making two programs. One for users, and one for myself. The user one I would like it to make a file to store what they input so I can review it before letting it go out onto the data base. is there a way to pull the data out of a document that the first program made so when I review I can hit accept and it will pick up those variables again and put them in the proper fields?

I'm sorry if these have already been asked, but I've searched and searched.

Edited by DaRam
Link to comment
Share on other sites

CODE
#include <GUIConstantsEx.au3>

#include <WindowsConstants.au3>

#include <GDIPlus.au3>

#Include <WinAPI.au3>

GUICreate("New Item Entry", 1000, 500)

GUICtrlCreateLabel("Item number", 10, 10)

$n1 = GUICtrlCreateInput("MPI", 150, 10, 150, 20)

GUICtrlCreateLabel("Short Description", 10, 30)

$n2 = GUICtrlCreateInput("", 150, 30, 150, 20)

GUICtrlCreateLabel("Count (ct/cnt)", 10, 50)

$n3 = GUICtrlCreateInput("", 150, 50, 150, 20)

GUICtrlCreateLabel("Packs (pk/cs)", 10, 70)

$n4 = GUICtrlCreateInput("", 150, 70, 150, 20)

GUICtrlCreateLabel("Length", 10, 90)

$n5 = GUICtrlCreateInput("", 150, 90, 150, 20)

GUICtrlCreateLabel("Width", 10, 110)

$n6 = GUICtrlCreateInput("", 150, 110, 150, 20)

GUICtrlCreateLabel("Height", 10, 130)

$n7 = GUICtrlCreateInput("", 150, 130, 150, 20)

GUICtrlCreateLabel("Carton Weight (lbs)", 10, 150)

$n8 = GUICtrlCreateInput("", 150, 150, 150, 20)

GUICtrlCreateLabel("Cartons per layer", 10, 170)

$n9 = GUICtrlCreateInput("", 150, 170, 150, 20)

GUICtrlCreateLabel("Layers per Skid", 10, 190)

$n10 = GUICtrlCreateInput("", 150, 190, 150, 20)

GUICtrlCreateLabel("Part Weight (g)", 10, 210)

$n11 = GUICtrlCreateInput("", 150, 210, 150, 20)

GUICtrlCreateLabel("UPC Code", 10, 230)

$n12 = GUICtrlCreateInput("", 150, 230, 150, 20)

GUICtrlCreateLabel("UCC Code", 10, 250)

$n13 = GUICtrlCreateInput("", 150, 250, 150, 20)

GUICtrlCreateLabel("Type of Packaging", 10, 270)

$n14 = GUICtrlCreateCombo("", 150, 270)

GUICtrlSetData(-1, "Bag|Packs|Shrinkwrap", "Bag")

GUICtrlCreateLabel("Base Layer Configuration", 400, 10)

$radio1 = GUICtrlCreateRadio("Standard 3x4", 400, 30, 120, 20)

$radio2 = GUICtrlCreateRadio("4x4", 550, 30, 120, 20)

$radio3 = GUICtrlCreateRadio("Standard 3x5", 400, 50, 120, 20)

$radio4 = GUICtrlCreateRadio("4x5", 550, 50, 120, 20)

$radio5 = GUICtrlCreateRadio("Special 3x3", 400, 70, 120, 20)

$radio6 = GUICtrlCreateRadio("Special 3x2", 550, 70, 120, 20)

GUICtrlCreateLabel("Available Colors", 400, 90)

$radio7 = GUICtrlCreateRadio("Clear", 400, 110, 120, 20)

$radio8 = GUICtrlCreateRadio("Blue", 550, 110, 120, 20)

$radio9 = GUICtrlCreateRadio("Green", 400, 130, 120, 20)

$radio10 = GUICtrlCreateRadio("Yellow", 550, 130, 120, 20)

$radio11 = GUICtrlCreateRadio("Orange", 400, 150, 120, 20)

$radio12 = GUICtrlCreateRadio("Pink", 550, 150, 120, 20)

$OKBUTTON = GUICtrlCreateButton("Save", 500, 450, 60)

GUISetState(@SW_SHOW)

send("{right}")

Send("{capslock on}")

While 1

$msg = GUIGetMsg()

Select

Case $msg = $radio1 And BitAND(GUICtrlRead($radio1), $GUI_CHECKED) = $GUI_CHECKED

$radiomaster = "1"

Case $msg = $radio7 And BitAND(GUICtrlRead($radio7), $GUI_CHECKED) = $GUI_CHECKED

$COLOR1 = "07 - CLEAR"

Case $msg = $radio8 And BitAND(GUICtrlRead($radio7), $GUI_CHECKED) = $GUI_CHECKED

$COLOR2 = "65 - BLUE"

Case $msg = $radio9 And BitAND(GUICtrlRead($radio7), $GUI_CHECKED) = $GUI_CHECKED

$COLOR3 = "?? - GREEN"

Case $msg = $radio10 And BitAND(GUICtrlRead($radio7), $GUI_CHECKED) = $GUI_CHECKED

$COLOR4 = "62 - YELLOW"

Case $msg = $radio11 And BitAND(GUICtrlRead($radio7), $GUI_CHECKED) = $GUI_CHECKED

$COLOR5 = "63 - ORANGE"

Case $msg = $radio12 And BitAND(GUICtrlRead($radio7), $GUI_CHECKED) = $GUI_CHECKED

$COLOR6 = "64 - PINK"

EndSelect

Select

Case $msg = $okbutton

MsgBox(0, "Saveing Data", "Are you sure?")

#include <part3.au3>

#include <next gui test.au3>

Exit

Case $msg = $GUI_EVENT_CLOSE

MsgBox(0, "Exit", "Closing, no data will be saved")

ExitLoop

EndSelect

WEnd

Thats the main script I'm working on Ive branched it off into 3 seperate scripts as you can see the part3.au3 and gui test.au3

The part3 opens our database puts in appropriate passwords and types all the inputs in and next gui test just asks if you'd like to make another entry and sends it back to the beginning. part 3 I'm sure I could incorpirate into the main, but good thing I didnt because I'd be posting our secrete passwords and work arounds. And if there is a better way to get it to ask if you want to create another entry and go back to the beginning please let me know. I will check your link when I get a chance, probably not till Monday with the way my weekend is looking :-P

Giggity

Link to comment
Share on other sites

alright I got the splash image to work. And it appears what I'm looking for is how to make an .ini file, and how to read that .ini file later. I looked at the help file on it, and I somewhat understand it, I just don't understand the section part of the code. I was wondering if someone could make me an example code of a gui that you input some text into, the text is saved to an .ini file, then is pulled out and written in a word file. If someone could make an example of that I think I could hack it up into what I need. And does anyone have any suggestions on a beginners guide to the coding? I'm getting a BASIC book tonight, I'm hoping will help. I just don't want to keep asking annoying noob questions, and at least know the terminology for the questions I want to ask

Giggity

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...