hanzz Posted February 21, 2006 Share Posted February 21, 2006 (edited) Hello, I have a question.At work I made a very good working auto it program, wich sets the scanner into various scan-presets.Each preset is shown as an image-button.Now I want to make a new program, that can re-trace the scans fast and accurate.here's is how the scans are stored on our server (at work) \year_month\day\numberG:\user\sanitel\2006_02\2102\245672.jpgG:\user\sanitel\2006_02\2102\245673.jpgetc..the numbers.jpg are a continuous number,representing what the scan stands for.This is what I made sofar.(right/wrong?) and what do I do now?Thanks for tips and/or help. Edited February 21, 2006 by hanzz MAY THE FUN BE WITH YOU ! Link to comment Share on other sites More sharing options...
hanzz Posted February 21, 2006 Author Share Posted February 21, 2006 (edited) I did a new try on an GUI. Maybe it's a better approach? Thanks for at least reading this. my guess is now I need a "GUICtrlread" thingy? #include <GUIConstants.au3> ; == GUI generated with Koda == $Form1 = GUICreate("zoekgereedschap", 320, 291, 192, 125) GUICtrlCreateLabel("JAAR", 40, 24, 31, 17) $Radio1 = GUICtrlCreateRadio("2005", 32, 48, 65, 17) $Radio2 = GUICtrlCreateRadio("2006", 32, 72, 65, 17) $Radio3 = GUICtrlCreateRadio("2007", 32, 96, 65, 17) $Radio4 = GUICtrlCreateRadio("2008", 32, 120, 65, 17) $Radio5 = GUICtrlCreateRadio("2009", 32, 144, 65, 17) $Radio6 = GUICtrlCreateRadio("2010", 32, 168, 65, 17) GUICtrlCreateLabel("MAAND", 112, 24, 43, 17) $List1 = GUICtrlCreateList("", 112, 48, 49, 84) GUICtrlSetData(-1, "01|02|03|04|05|06|07|08|09|10|11|12") GUICtrlCreateLabel("Gemaakt door Hans Deconinck", 40, 0, 159, 17) GUICtrlSetColor(-1, 0xC0C0C0) $Input1 = GUICtrlCreateInput("", 176, 48, 121, 21) GUICtrlCreateLabel("BTW-Nummer", 176, 24, 71, 17) $Button1 = GUICtrlCreateButton("ZOEK !", 120, 224, 75, 25, 0) GUISetState(@SW_SHOW) While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case Else ;;;;;;; EndSelect WEnd Exit Edited February 21, 2006 by hanzz MAY THE FUN BE WITH YOU ! Link to comment Share on other sites More sharing options...
WFC Posted February 26, 2006 Share Posted February 26, 2006 I did a new try on an GUI. Maybe it's a better approach? Thanks for at least reading this. my guess is now I need a "GUICtrlread" thingy? #include <GUIConstants.au3> ; == GUI generated with Koda == $Form1 = GUICreate("zoekgereedschap", 320, 291, 192, 125) GUICtrlCreateLabel("JAAR", 40, 24, 31, 17) $Radio1 = GUICtrlCreateRadio("2005", 32, 48, 65, 17) $Radio2 = GUICtrlCreateRadio("2006", 32, 72, 65, 17) $Radio3 = GUICtrlCreateRadio("2007", 32, 96, 65, 17) $Radio4 = GUICtrlCreateRadio("2008", 32, 120, 65, 17) $Radio5 = GUICtrlCreateRadio("2009", 32, 144, 65, 17) $Radio6 = GUICtrlCreateRadio("2010", 32, 168, 65, 17) GUICtrlCreateLabel("MAAND", 112, 24, 43, 17) $List1 = GUICtrlCreateList("", 112, 48, 49, 84) GUICtrlSetData(-1, "01|02|03|04|05|06|07|08|09|10|11|12") GUICtrlCreateLabel("Gemaakt door Hans Deconinck", 40, 0, 159, 17) GUICtrlSetColor(-1, 0xC0C0C0) $Input1 = GUICtrlCreateInput("", 176, 48, 121, 21) GUICtrlCreateLabel("BTW-Nummer", 176, 24, 71, 17) $Button1 = GUICtrlCreateButton("ZOEK !", 120, 224, 75, 25, 0) GUISetState(@SW_SHOW) While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case Else ;;;;;;; EndSelect WEnd Exit Your path was G:\user\sanitel\2006_02\2102\245672.jpg Is the 2102 part the day and month? If so you need to allow the selection of the day as well. You could then use this information to build a path. I would use FileOpenDialog and allow the user to select the filename instead of searching for it since they are in numerical order. I have written a short program that you would need to change for your purposes. I made a c:\user\2006 directory on my system and copied some .jpg's to it and was able to select a picture and send it to my graphics program. Windows Picture and Fax Viewer you let you page through them as well as just display them. #include <GUIConstants.au3> $path = "c:\user\" ; you would use G:\user\sanitel\ here $Form1 = GUICreate("SEARCH TOOL", 511, 187, 192, 125) $year = GUICtrlCreateCombo("YEAR", 24, 32, 121, 21) Guictrlsetdata(-1, "2005|2006|2007") ; I didn't add all the years you had in your program $month = GUICtrlCreateCombo("MONTH", 176, 32, 145, 21) GUICtrlSetData(-1, "01|02|03|04|05|06|07|08|09|10|11|12") $Input1 = GUICtrlCreateInput("", 328, 32, 129, 21) $SEARCH = GUICtrlCreateButton("SEARCH", 184, 96, 105, 25, 0) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $SEARCH ; executed when you hit the search button $yr = GUICtrlRead($year) ; read the year and month $mon = GUICtrlRead($month) If $yr = "YEAR" Or $mon = "MONTH" Or $Input1 = "" Then ; check to see that the fields are filled out Msgbox(32, "Error", "Please enter Year, Month and a search string") ExitLoop ; exit if something was left out EndIf $path = $path & $yr ; build the path to the correct directory $OpenFile = FileOpenDialog ("Open", $path, "Jpg (*.jpg)", 1 & 2 & 4) ; display file open dialog If @error Then MsgBox(4096, "", "No File(s) chosen", 2000) ExitLoop ; didn't chose a file so exit -- could have been another error but exit on any error EndIf Run("c:\program files\arcsoft\photostudio 5\photostudio.exe " & $OpenFile) ; run the program you want to display the jpg EndSelect WEnd Exit Hope you are able to use this to get you started. WFC 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