hodgepodge Posted June 13, 2009 Share Posted June 13, 2009 (edited) Alright, so this is my first attempt at a complete, functional script in any language (except JS, HTML, etc...)... So I am running into a few problems... What I am trying to accomplish is a program that will allow me to enter product codes into a list, then, when I press a search button the script will look on two specified sites and return the price of the product alone. First of all I am lost as to how you incorporate internet functions into the script, however, this seems like it would be simple enough, I just need some guidance. The major obstacle I think I will be facing will be isolating the price of the product alone on the web page and returning that value to a table. Is there any function that could accomplish it? Would I have to parse the page itself? Finally could you please also critique my script, just learning...Thanks.. #include<GUIConstantsEX.au3> #include<IE.au3> #include<WindowsConstants.au3> #include<Constants.au3> Opt("GUIOnEventMode", 1) Opt("GUICloseOnESC", 0) $s_1 = 'upcdatabase.com/item/' $s_2 = 'http://www.amazon.com/s/ref=nb_ss_hi?url=node%3D468240%2C328182011&field-keywords=' $s_3 = 'http://www.google.com/products?q=' ;Main GUI ;Array is for the product codes ;Array two is for the prices Local $array[], $array2[], $list, $add, $msg, $search, $in GUICreate( "Product Search") $search = GUICtrlCreateButton("Search!", 5, 7) ; fix all the alignment later $add = GUICtrlCreateButton("Add", 2, 5) $list = GUICtrlCreateList("Items to search for", 3, 3) $in = GUICtrlCreateInput("" , 3, 1) $in = $array [1 to 20] ;no idea if this is right ;create search function and add function While 1 $msg = GUIGetMsg() Select Case $msg = $search ;place search function here Case $msg = $add GUICtrlSetData($list, $in) Edited June 13, 2009 by hodgepodge Link to comment Share on other sites More sharing options...
Yashied Posted June 13, 2009 Share Posted June 13, 2009 You lost a part of the code. My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
hodgepodge Posted June 13, 2009 Author Share Posted June 13, 2009 You lost a part of the code. Haha, no I just haven't bothered "finishing" it without figuring out how to proceed.How does the code look so far, and.. any answer to the question of discerning the price? Link to comment Share on other sites More sharing options...
Yashied Posted June 13, 2009 Share Posted June 13, 2009 Haha, no I just haven't bothered "finishing" it without figuring out how to proceed.How does the code look so far, and.. any answer to the question of discerning the price?Good luck. My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
hodgepodge Posted June 13, 2009 Author Share Posted June 13, 2009 Well, do you have, any help to offer? ... Link to comment Share on other sites More sharing options...
Zisly Posted June 13, 2009 Share Posted June 13, 2009 (edited) If you use GUIOnEventMode you can't use GUIGetMsg(). So either use GUIOnEventMode or GUIGetMsg(). If you want the gui to show you need to add guisetstate(@sw_show).. Like this; GUICreate( "Product Search") $search = GUICtrlCreateButton("Search!", 5, 7); fix all the alignment later $add = GUICtrlCreateButton("Add", 2, 5) $list = GUICtrlCreateList("Items to search for", 3, 3) $in = GUICtrlCreateInput("" , 3, 1) GUISetState(@SW_SHOW) And what where you trying to do with $array [1 to 20]? Edited June 13, 2009 by Zisly Link to comment Share on other sites More sharing options...
Yashied Posted June 13, 2009 Share Posted June 13, 2009 Alright, so this is my first attempt at a complete, functional script in any language (except JS, HTML, etc...)...So I am running into a few problems...What I am trying to accomplish is a program that will allow me to enter product codes into a list, then, when I press a search button the script will look on two specified sites and return the price of the product alone. First of all I am lost as to how you incorporate internet functions into the script, however, this seems like it would be simple enough, I just need some guidance.The major obstacle I think I will be facing will be isolating the price of the product alone on the web page and returning that value to a table. Is there any function that could accomplish it? Would I have to parse the page itself? Finally could you please also critique my script, just learning...Thanks..Where are you taking this script? My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
hodgepodge Posted June 13, 2009 Author Share Posted June 13, 2009 (edited) If you use GUIOnEventMode you can't use GUIGetMsg(). So either use GUIOnEventMode or GUIGetMsg(). If you want the gui to show you need to add guisetstate(@sw_show).. Like this; GUICreate( "Product Search") $search = GUICtrlCreateButton("Search!", 5, 7); fix all the alignment later $add = GUICtrlCreateButton("Add", 2, 5) $list = GUICtrlCreateList("Items to search for", 3, 3) $in = GUICtrlCreateInput("" , 3, 1) GUISetState(@SW_SHOW) And what where you trying to do with $array [1 to 20]?Oh, alright... And about the array...Well, I want to store whatever I input into that array so I can recall the values later into the program. Im almost certain that that isn't the way to do it however... >.> <.< Oh, also, how do I link the input form with a button using the GUIset method, the help file only shows how I would do that with the msg method... Thanks Edited June 13, 2009 by hodgepodge Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now