Thatsgreat2345 Posted November 12, 2005 Share Posted November 12, 2005 Is there anyway to have a thing that with out having a big folder of pictures that you can just press next and it will show you another picture and so on but its all combined into one .exe i was thinking of making an installer that would just create a big folder of pictures in your c drive and then use that and just put a bunch of and use GUIcreatpic but thats not really what i wanted to do so if anyone can help me that would be great Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted November 12, 2005 Moderators Share Posted November 12, 2005 (edited) Wow that would be a hefty .exe Edit:Might want to look in the GUI forum, and look at picture installing, I saw a few post on it a few months ago!! This with the Multiple GUI's may give you what you want (I didn't pay much attention on the post to be honest, so i don't even know if they found a solution, I'm sure it had to do with fileinstall... I'll take a quick look, and If I can find it, I'll post the thread).Edit 2: Here are the links I found for you...http://www.autoitscript.com/forum/index.ph...ndpost&p=107719http://www.autoitscript.com/forum/index.ph...indpost&p=69719 Edited November 12, 2005 by ronsrules Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted November 12, 2005 Author Share Posted November 12, 2005 thanks ronsrule it worked tested it moved the picture and stuff and it worked so im happy now i just need to make the next button work Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted November 12, 2005 Author Share Posted November 12, 2005 hey rons u think u could hook me up with how to do that ive been trying to figure it out but i cant like on button click or whatever every get $Pic2 how would you go about doing that? ive never been god with GUIs Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted November 12, 2005 Moderators Share Posted November 12, 2005 Sorry I just caught this thread on my way to Bed!!, to get my 2 hrs of sleep before I have to get back up. When I do roll out of bed... If someone hasn't done it, I'll give it a try... this is more down the lines of Gary though than myself... And I'm sure others would have fun trying (and succeeding ). Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted November 12, 2005 Author Share Posted November 12, 2005 (edited) ok i figured it out i checked the help file and with the input box checking if you have the right answer or whatever the problem is it uses a pop up message box but thats not what i wany ive been trying alll morning trying to make the button work in the GUI but i just cant figure it out and if u cant figure it out ill go make a new topic in the GUI section expandcollapse popup#region --- GuiBuilder code Start --- ; Script generated by AutoBuilder 0.5 Prototype #include <GuiConstants.au3> GuiCreate("MyGUI", 700, 625,(@DesktopWidth-698)/2, (@DesktopHeight-625)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) FileInstall("E:\stupid3.jpg", @TempDir & "\hello.jpg") $Pic1 = GuiCtrlCreatePic(@TempDir & "\hello.jpg", 50, 50, 500,450) sleep(2000) #Region --- CodeWizard generated code Start --- ;MsgBox features: Title=Yes, Text=Yes, Buttons=Yes and No, Icon=Warning, Miscellaneous=Title/text right-justified If Not IsDeclared("iMsgBoxAnswer") Then Dim $iMsgBoxAnswer $iMsgBoxAnswer = MsgBox(4,"Next","Next?") Select Case $iMsgBoxAnswer = 6;Next EndSelect #EndRegion --- CodeWizard generated code End --- If $ImsgBoxAnswer = 6 Then GUICtrlDelete ( $Pic1 ) FileInstall("E:\stupid.jpg", @TempDir & "\hello22.jpg") $Pic2 = GuiCtrlCreatePic(@TempDir & "\hello22.jpg", 50, 50, 500,500) GuiSetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case Else ;;; EndSelect WEnd Exit call("wait") endif func wait() while 1 sleep(100) wend endfunc Edited November 12, 2005 by thatsgreat2345 Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted November 12, 2005 Moderators Share Posted November 12, 2005 Rather crude, but first attempt... expandcollapse popup#include <guiconstants.au3> Dim $PIC_ONE = @TempDir & "\Blue hills.jpg" Dim $PIC_TWO = @TempDir & "\Sunset.jpg" If Not FileExists($PIC_ONE) Then FileInstall("C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures\Blue hills.jpg", @TempDir & "\Blue hills.jpg") EndIf If Not FileExists($PIC_TWO) Then FileInstall("C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures\Sunset.jpg", @TempDir & "\Sunset.jpg") EndIf Dim $FIRST_GUI, $SECOND_GUI $GUI_MSGBOX = MsgBox(4, "OPTIONAL VIEWER", "WOULD YOU LIKE TO SEE OUR PICTURES?") If $GUI_MSGBOX = 6 Then FIRST_PIC_GUI() Else Exit EndIf Func FIRST_PIC_GUI() $FIRST_GUI = GUICreate("FIRST PIC", 200, 200) $VIEW_ONE = GUICtrlCreatePic($PIC_ONE, -1, -1, 200, 200, $WS_DISABLED) $NEXT_BUTTON = GUICtrlCreateButton("NEXT", 150, 170, 50, 30, $BS_DEFPUSHBUTTON, $WS_EX_TOPMOST) GUISetState() While 1 $MSG = GUIGetMsg() Select Case $MSG = $GUI_EVENT_CLOSE GUIDelete($FIRST_GUI) Exit_Now() Case $MSG = $NEXT_BUTTON Next_PIC() EndSelect Sleep(100) WEnd EndFunc Func Next_PIC() If WinExists("FIRST PIC") Then GUIDelete($FIRST_GUI) NEW_PIC_GUI() ElseIf WinExists("SECOND PIC") Then GUIDelete($SECOND_GUI) FIRST_PIC_GUI() EndIf EndFunc Func NEW_PIC_GUI() $SECOND_GUI = GUICreate("SECOND PIC", 200, 200) $VIEW_TWO = GUICtrlCreatePic($PIC_TWO, -1, -1, 200, 200, $WS_DISABLED) $NEXT_BUTTON = GUICtrlCreateButton("NEXT", 150, 170, 50, 30, $BS_DEFPUSHBUTTON, $WS_EX_TOPMOST) GUISetState() While 1 $MSG2 = GUIGetMsg() Select Case $MSG2 = $GUI_EVENT_CLOSE GUIDelete($SECOND_GUI) Exit_Now() Case $MSG2 = $NEXT_BUTTON Next_PIC() EndSelect Sleep(100) WEnd EndFunc Func Exit_Now() If FileExists($PIC_ONE) Then FileDelete($PIC_ONE) EndIf If FileExists($PIC_TWO) Then FileDelete($PIC_TWO) EndIf Exit EndFunc Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted November 12, 2005 Author Share Posted November 12, 2005 (edited) <3 ronsrules ok so yeah i tryed to make a third but it keeps giving me an error on everything ive added which is stringbreak with out trailing Edited November 12, 2005 by thatsgreat2345 Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted November 12, 2005 Moderators Share Posted November 12, 2005 can you post how you did it?... code is fairly easy to modify, I tried to give most everything you would need. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted November 12, 2005 Author Share Posted November 12, 2005 well first i added at the begining added dim pic three and installed a third pic added a third gui to the DIM and then copied paste the first GUI till the second GUI then changed it so that it was all one more then i added the Third GUI changed all func names and at the end i added it so that it would delete the third picture but on every thing it kept giving me the same error Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted November 12, 2005 Moderators Share Posted November 12, 2005 (edited) expandcollapse popup#include <guiconstants.au3> Dim $PIC_ONE = @TempDir & "\Blue hills.jpg" Dim $PIC_TWO = @TempDir & "\Sunset.jpg" Dim $PIC_THREE = @TempDir & "\Winter.jpg" If Not FileExists($PIC_ONE) Then FileInstall(@DocumentsCommonDir & "\My Pictures\Sample Pictures\Blue hills.jpg", @TempDir & "\Blue hills.jpg") EndIf If Not FileExists($PIC_TWO) Then FileInstall(@DocumentsCommonDir & "\My Pictures\Sample Pictures\Sunset.jpg", @TempDir & "\Sunset.jpg") EndIf If Not FileExists($PIC_THREE) Then FileInstall(@DocumentsCommonDir & "\My Pictures\Sample Pictures\Winter.jpg", @TempDir & "\Winter.jpg") EndIf Dim $FIRST_GUI, $SECOND_GUI, $THIRD_GUI $GUI_MSGBOX = MsgBox(4, "OPTIONAL VIEWER", "WOULD YOU LIKE TO SEE OUR PICTURES?") If $GUI_MSGBOX = 6 Then FIRST_PIC_GUI() Else Exit EndIf Func FIRST_PIC_GUI() $FIRST_GUI = GUICreate("FIRST PIC", 200, 200) $VIEW_ONE = GUICtrlCreatePic($PIC_ONE, -1, -1, 200, 200) GuiCtrlSetState(-1,$GUI_DISABLE) $NEXT_BUTTON = GUICtrlCreateButton("NEXT >>", 150, 170, 50, 30, $BS_DEFPUSHBUTTON) GUISetState() While 1 $MSG = GUIGetMsg() Select Case $MSG = $GUI_EVENT_CLOSE GUIDelete($FIRST_GUI) Exit_Now() Case $MSG = $NEXT_BUTTON Next_PIC() EndSelect Sleep(100) WEnd EndFunc ;==>FIRST_PIC_GUI Func Next_PIC() If WinExists("FIRST PIC") Then GUIDelete($FIRST_GUI) NEW_PIC_GUI() ElseIf WinExists("SECOND PIC") Then GUIDelete($SECOND_GUI) NEW_PIC_GUI_2() EndIf EndFunc ;==>Next_PIC Func BACK_BUTTON() If WinExists("SECOND PIC") Then GUIDelete($SECOND_GUI) FIRST_PIC_GUI() ElseIf WinExists("THIRD PIC") Then GUIDelete($THIRD_GUI) NEW_PIC_GUI() EndIf EndFunc ;==>BACK_BUTTON Func NEW_PIC_GUI() $SECOND_GUI = GUICreate("SECOND PIC", 200, 200) $VIEW_TWO = GUICtrlCreatePic($PIC_TWO, -1, -1, 200, 200) GuiCtrlSetState(-1,$GUI_DISABLE) $BACK_BUTTON = GUICtrlCreateButton("<< BACK", 100, 170, 50, 30) $NEXT_BUTTON = GUICtrlCreateButton("NEXT >>", 150, 170, 50, 30, $BS_DEFPUSHBUTTON) GUISetState() While 1 $MSG2 = GUIGetMsg() Select Case $MSG2 = $GUI_EVENT_CLOSE GUIDelete($SECOND_GUI) Exit_Now() Case $MSG2 = $NEXT_BUTTON Next_PIC() Case $MSG2 = $BACK_BUTTON BACK_BUTTON() EndSelect Sleep(100) WEnd EndFunc ;==>NEW_PIC_GUI Func NEW_PIC_GUI_2() $THIRD_GUI = GUICreate("THIRD PIC", 200, 200) $VIEW_THREE = GUICtrlCreatePic($PIC_THREE, -1, -1, 200, 200) GuiCtrlSetState(-1,$GUI_DISABLE) $BACK_BUTTON = GUICtrlCreateButton("<< BACK", 150, 170, 50, 30, $BS_DEFPUSHBUTTON) GUISetState() While 1 $MSG3 = GUIGetMsg() Select Case $MSG3 = $GUI_EVENT_CLOSE GUIDelete($THIRD_GUI) Exit_Now() Case $MSG3 = $BACK_BUTTON BACK_BUTTON() EndSelect Sleep(100) WEnd EndFunc ;==>NEW_PIC_GUI_2 Func Exit_Now() If FileExists($PIC_ONE) Then FileDelete($PIC_ONE) EndIf If FileExists($PIC_TWO) Then FileDelete($PIC_TWO) EndIf If FileExists($PIC_THREE) Then FileDelete($PIC_THREE) EndIf Exit EndFunc ;==>Exit_NowI don't know what your doing, but why didn't you just post your errors so someone could find the problem... you just saying what you "think" you did doesn't help... it could have just been a typo.EDIT:Changed the path name to @DocumentsCommonDir, because the is the sample pictures that come standard with windows xp so you can get a working example.EDIT2:Used the proper disable style Edited November 12, 2005 by ronsrules Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted November 12, 2005 Author Share Posted November 12, 2005 yeah hold on ill attempt to add a 4th picture Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted November 12, 2005 Author Share Posted November 12, 2005 (edited) yeah i tryed and failed i messed it up a lil b4 i posted it hear but yeah im screwed im not that good at auto it so yeah C:\Documents and Settings\NEON\Desktop\test.au3(118,19) : ERROR: BACK_BUTTON() already defined. Func BACK_BUTTON() ~~~~~~~~~~~~~~~~~~^ C:\Documents and Settings\NEON\Desktop\test.au3(111,27) : ERROR: Next_PIC1(): undefined function. Next_PIC1() ~~~~~~~~~~~~~~~~~~~~~~~~~~^ C:\Documents and Settings\NEON\Desktop\test.au3(121,25) : ERROR: SECCOND_PIC_GUI(): undefined function. SECCOND_PIC_GUI() expandcollapse popup#include <guiconstants.au3> Dim $PIC_ONE = @TempDir & "\stupid.jpg" Dim $PIC_TWO = @TempDir & "\stupid1.jpg" Dim $PIC_THREE = @TempDir & "\stupid2.jpg" Dim $PIC_FOUR = @TempDir & "\stupid3.jpg" If Not FileExists($PIC_ONE) Then FileInstall("E:\stupid.jpg", @TempDir & "\stupid.jpg") EndIf If Not FileExists($PIC_TWO) Then FileInstall("E:\stupid1.jpg", @TempDir & "\stupid1.jpg") EndIf If Not FileExists($PIC_THREE) Then FileInstall("E:\stupid3.jpg", @TempDir & "\stupid2.jpg") EndIf If Not FileExists($PIC_FOUR) Then FileInstall("E:\stupid3.jpg", @TempDir & "\stupid3.jpg") EndIf Dim $FIRST_GUI, $SECOND_GUI, $THIRD_GUI , $FOURTH_GUI $GUI_MSGBOX = MsgBox(4, "OPTIONAL VIEWER", "WOULD YOU LIKE TO SEE OUR PICTURES?") If $GUI_MSGBOX = 6 Then FIRST_PIC_GUI() Else Exit EndIf Func FIRST_PIC_GUI() $FIRST_GUI = GUICreate("FIRST PIC", 700, 700) $VIEW_ONE = GUICtrlCreatePic($PIC_ONE, 50, 50, 600, 500, $WS_DISABLED) $NEXT_BUTTON = GUICtrlCreateButton("NEXT >>", 600, 550, 90, 30, $BS_DEFPUSHBUTTON, $WS_EX_TOPMOST) GUISetState() While 1 $MSG = GUIGetMsg() Select Case $MSG = $GUI_EVENT_CLOSE GUIDelete($FIRST_GUI) Exit_Now() Case $MSG = $NEXT_BUTTON Next_PIC() EndSelect Sleep(100) WEnd EndFunc;==>FIRST_PIC_GUI Func Next_PIC() If WinExists("FIRST PIC") Then GUIDelete($FIRST_GUI) NEW_PIC_GUI() ElseIf WinExists("SECOND PIC") Then GUIDelete($SECOND_GUI) NEW_PIC_GUI_2() EndIf EndFunc;==>Next_PIC Func BACK_BUTTON() If WinExists("SECOND PIC") Then GUIDelete($SECOND_GUI) FIRST_PIC_GUI() ElseIf WinExists("THIRD PIC") Then GUIDelete($THIRD_GUI) NEW_PIC_GUI() EndIf EndFunc;==>BACK_BUTTON Func NEW_PIC_GUI() $SECOND_GUI = GUICreate("SECOND PIC", 700, 700) $VIEW_TWO = GUICtrlCreatePic($PIC_TWO, 50, 50, 600, 500, $WS_DISABLED) $BACK_BUTTON = GUICtrlCreateButton("<< BACK", 500, 550, 100, 30, "", $WS_EX_TOPMOST) $NEXT_BUTTON = GUICtrlCreateButton("NEXT >>", 600, 550, 90, 30, $BS_DEFPUSHBUTTON, $WS_EX_TOPMOST) GUISetState() While 1 $MSG2 = GUIGetMsg() Select Case $MSG2 = $GUI_EVENT_CLOSE GUIDelete($SECOND_GUI) Exit_Now() Case $MSG2 = $NEXT_BUTTON Next_PIC() Case $MSG2 = $BACK_BUTTON BACK_BUTTON() EndSelect Sleep(100) WEnd EndFunc;==>NEW_PIC_GUI Func NEW_PIC_GUI_2() $THIRD_GUI = GUICreate("THIRD PIC", 700, 700) $VIEW_THREE = GUICtrlCreatePic($PIC_THREE, 50, 50, 600, 500, $WS_DISABLED) $BACK_BUTTON = GUICtrlCreateButton("<< BACK", 500, 550, 100, 30, $BS_DEFPUSHBUTTON, $WS_EX_TOPMOST) $NEXT_BUTTON = GUICtrlCreateButton("NEXT >>", 600, 550, 90, 30, $BS_DEFPUSHBUTTON, $WS_EX_TOPMOST) GUISetState() While 1 $MSG2 = GUIGetMsg() Select Case $MSG2 = $GUI_EVENT_CLOSE GUIDelete($THIRD_GUI) Exit_Now() Case $MSG2 = $NEXT_BUTTON Next_PIC1() Case $MSG2 = $BACK_BUTTON BACK_BUTTON() EndSelect Sleep(100) WEnd EndFunc;==>NEW_PIC_GUI Func Next_PIC1() If WinExists("FIRST PIC") Then GUIDelete($FIRST_GUI) NEW_PIC_GUI() ElseIf WinExists("SECOND PIC") Then GUIDelete($SECOND_GUI) NEW_PIC_GUI_2() ElseIf WinExists("THIRD PIC") Then GUIDelete($THIRD_GUI) NEW_PIC_GUI_3() EndIf EndFunc;==>Next_PIC Func BACK_BUTTON() If WinExists("SECOND PIC") Then GUIDelete($SECOND_GUI) SECCOND_PIC_GUI() ElseIf WinExists("THIRD PIC") Then GUIDelete($THIRD_GUI) NEW_PIC_GUI() EndIf EndFunc;==>BACK_BUTTON Func NEW_PIC_GUI_3() $FOURTH_GUI = GUICreate("FOURTH PIC", 700, 700) $VIEW_FOUR = GUICtrlCreatePic($PIC_FOUR, 50, 50, 600, 500, $WS_DISABLED) $BACK_BUTTON = GUICtrlCreateButton("<< BACK", 500, 550, 100, 30, $BS_DEFPUSHBUTTON, $WS_EX_TOPMOST) While 1 $MSG2 = GUIGetMsg() Select Case $MSG2 = $GUI_EVENT_CLOSE GUIDelete($FOURTH_GUI) Exit_Now() Case $MSG2 = $BACK_BUTTON BACK_BUTTON() EndSelect Sleep(100) WEnd EndFunc;==>NEW_PIC_GUI Func Exit_Now() If FileExists($PIC_ONE) Then FileDelete($PIC_ONE) EndIf If FileExists($PIC_TWO) Then FileDelete($PIC_TWO) EndIf If FileExists($PIC_THREE) Then FileDelete($PIC_THREE) EndIf If FileExists($PIC_FOUR) Then FileDelete($PIC_FOUR) EndIf Exit EndFunc;==>Exit_Now Edited November 12, 2005 by thatsgreat2345 Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted November 12, 2005 Moderators Share Posted November 12, 2005 Ugh... so much of an easier way... see what happens when you tinker around... Look below. expandcollapse popup#include <guiconstants.au3> Dim $PIC_ONE = @TempDir & "\Blue hills.jpg" Dim $PIC_TWO = @TempDir & "\Sunset.jpg" Dim $PIC_THREE = @TempDir & "\Winter.jpg" If Not FileExists($PIC_ONE) Then FileInstall(@DocumentsCommonDir & "\My Pictures\Sample Pictures\Blue hills.jpg", @TempDir & "\Blue hills.jpg") EndIf If Not FileExists($PIC_TWO) Then FileInstall(@DocumentsCommonDir & "\My Pictures\Sample Pictures\Sunset.jpg", @TempDir & "\Sunset.jpg") EndIf If Not FileExists($PIC_THREE) Then FileInstall(@DocumentsCommonDir & "\My Pictures\Sample Pictures\Winter.jpg", @TempDir & "\Winter.jpg") EndIf $FIRST_GUI = GUICreate("Pictures", 200, 200) $VIEW_ONE = GUICtrlCreatePic($PIC_ONE, -1, -1, 200, 200) GuiCtrlSetState($VIEW_ONE, $GUI_DISABLE) $BACK_BUTTON = GUICtrlCreateButton("<< BACK", 100, 170, 50, 30, "", 0x00000008) GUICtrlSetState($BACK_BUTTON, $GUI_DISABLE) $NEXT_BUTTON = GUICtrlCreateButton("NEXT >>", 150, 170, 50, 30, $BS_DEFPUSHBUTTON, 0x00000008) GUISetState() $COUNT = 1 $COUNT2 = 1 While 1 $MSG = GUIGetMsg() Select Case $MSG = $GUI_EVENT_CLOSE GUIDelete($FIRST_GUI) Exit_Now() Case $MSG = $NEXT_BUTTON If $COUNT = 1 Then $NEW_1 = GUICtrlSetImage($VIEW_ONE, $PIC_TWO) GuiCtrlSetState($NEW_1, $GUI_DISABLE) GUICtrlSetState($BACK_BUTTON, $GUI_ENABLE) $COUNT = 2 Else $NEW_2 = GUICtrlSetImage($VIEW_ONE, $PIC_THREE) GuiCtrlSetState($NEW_2, $GUI_DISABLE) GUICtrlSetState($BACK_BUTTON, $GUI_ENABLE) $COUNT = 1 EndIf Case $MSG = $BACK_BUTTON If $COUNT2 = 1 Then $ORIGINAL = GUICtrlSetImage($VIEW_ONE, $PIC_ONE) GuiCtrlSetState($ORIGINAL, $GUI_DISABLE) GUICtrlSetState($BACK_BUTTON, $GUI_DISABLE) $COUNT2 = 2 Else $NEW_1 = GUICtrlSetImage($VIEW_ONE, $PIC_TWO) GuiCtrlSetState($NEW_1, $GUI_DISABLE) GUICtrlSetState($BACK_BUTTON, $GUI_ENABLE) $COUNT2 = 1 EndIf EndSelect Sleep(100) WEnd Func Exit_Now() If FileExists($PIC_ONE) Then FileDelete($PIC_ONE) EndIf If FileExists($PIC_TWO) Then FileDelete($PIC_TWO) EndIf If FileExists($PIC_THREE) Then FileDelete($PIC_THREE) EndIf Exit EndFunc ;==>Exit_Now need to fix the buttons up a bit Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted November 12, 2005 Moderators Share Posted November 12, 2005 (edited) yeah i tryed and failed i messed it up a lil b4 i posted it hear but yeah im screwed im not that good at auto it so yeahC:\Documents and Settings\NEON\Desktop\test.au3(118,19) : ERROR: BACK_BUTTON() already defined.Func BACK_BUTTON()~~~~~~~~~~~~~~~~~~^C:\Documents and Settings\NEON\Desktop\test.au3(111,27) : ERROR: Next_PIC1(): undefined function. Next_PIC1()~~~~~~~~~~~~~~~~~~~~~~~~~~^C:\Documents and Settings\NEON\Desktop\test.au3(121,25) : ERROR: SECCOND_PIC_GUI(): undefined function. SECCOND_PIC_GUI()Well if you have windows xp, just try my last one without modifying it so you can see how it works.With yours, you were installing the same picture and naming it differently, you didn't modify the next and back functions to suit the new GUI names, and carry them on to the next one. all you did was put coords in. Also good practice when doing variables, is naming them something different in other functions... $MSG2 , you have as $MSG2 in the third gui.You have a lot of posts... so I imagine most of them are questions... just take your time, look at each function name that is called, then look it up in the help file to get a better understanding. This will help you with editing and modifying things, if you better understand what each mean.Good Luck, I think the last script I did, would be exactly what your looking for.EDIT!!! POST NUMBER '666', Ok... I'm done for the day!! Edited November 12, 2005 by ronsrules Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted November 13, 2005 Author Share Posted November 13, 2005 (edited) ok yeah the new script is looks better but one thing when adding a new picture what do i add instead of else ive looked in the help file but nothing really came up so do i just expandcollapse popup#include <guiconstants.au3> Dim $PIC_ONE = @TempDir & "\stupid.jpg" Dim $PIC_TWO = @TempDir & "\stupid1.jpg" Dim $PIC_THREE = @TempDir & "\stupid2.jpg" Dim $PIC_FOUR = @TempDir & "\stupid3.jpg" If Not FileExists($PIC_ONE) Then FileInstall("E:\stupid.jpg", @TempDir & "\stupid.jpg") EndIf If Not FileExists($PIC_TWO) Then FileInstall("E:\stupid1.jpg", @TempDir & "\stupid1.jpg") EndIf If Not FileExists($PIC_THREE) Then FileInstall("E:\stupid3.jpg", @TempDir & "\stupid2.jpg") EndIf If Not FileExists($PIC_FOUR) Then FileInstall("E:\stupid3.jpg", @TempDir & "\stupid3.jpg") EndIf $FIRST_GUI = GUICreate("Pictures", 700, 700) $VIEW_ONE = GUICtrlCreatePic($PIC_ONE, 50, 50, 600, 500) GuiCtrlSetState($VIEW_ONE, $GUI_DISABLE) $BACK_BUTTON = GUICtrlCreateButton("<< BACK", 00, 550, 100, 30, "", 0x00000008) GUICtrlSetState($BACK_BUTTON, $GUI_DISABLE) $NEXT_BUTTON = GUICtrlCreateButton("NEXT >>", 600, 550, 90, 30, $BS_DEFPUSHBUTTON, 0x00000008) GUISetState() $COUNT = 1 $COUNT2 = 1 While 1 $MSG = GUIGetMsg() Select Case $MSG = $GUI_EVENT_CLOSE GUIDelete($FIRST_GUI) Exit_Now() Case $MSG = $NEXT_BUTTON If $COUNT = 1 Then $NEW_1 = GUICtrlSetImage($VIEW_ONE, $PIC_TWO) GuiCtrlSetState($NEW_1, $GUI_DISABLE) GUICtrlSetState($BACK_BUTTON, $GUI_ENABLE) $COUNT = 2 Else $NEW_2 = GUICtrlSetImage($VIEW_ONE, $PIC_THREE) GuiCtrlSetState($NEW_2, $GUI_DISABLE) GUICtrlSetState($BACK_BUTTON, $GUI_ENABLE) $COUNT = 1 Else $NEW_3 = GUICtrlSetImage($VIEW_TWO, $PIC_FOUR) GuiCtrlSetState($NEW_3, $GUI_DISABLE) GUICtrlSetState($BACK_BUTTON, $GUI_ENABLE) $COUNT = 1 Endif EndSelect wend Else $NEW_3 = GUICtrlSetImage($VIEW_ONE, $PIC_FOUR) GuiCtrlSetState($NEW_3, $GUI_DISABLE) GUICtrlSetState($BACK_BUTTON, $GUI_ENABLE) $COUNT = 3 EndIf EndSelect Case $MSG = $BACK_BUTTON If $COUNT2 = 1 Then $ORIGINAL = GUICtrlSetImage($VIEW_ONE, $PIC_ONE) GuiCtrlSetState($ORIGINAL, $GUI_DISABLE) GUICtrlSetState($BACK_BUTTON, $GUI_DISABLE) $COUNT2 = 2 Else $NEW_1 = GUICtrlSetImage($VIEW_ONE, $PIC_TWO) GuiCtrlSetState($NEW_1, $GUI_DISABLE) GUICtrlSetState($BACK_BUTTON, $GUI_ENABLE) $COUNT2 = 1 Else $NEW_2 = GUICtrlSetImage($VIEW_TWO, $PIC_THREE) GuiCtrlSetState($NEW_2, $GUI_DISABLE) GUICtrlSetState($BACK_BUTTON, $GUI_ENABLE) $COUNT2 = 1 EndIf EndSelect Sleep(100) WEnd Func Exit_Now() If FileExists($PIC_ONE) Then FileDelete($PIC_ONE) EndIf If FileExists($PIC_TWO) Then FileDelete($PIC_TWO) EndIf If FileExists($PIC_THREE) Then FileDelete($PIC_THREE) EndIf If FileExists($PIC_FOUR) Then FileDelete($PIC_FOUR) EndIf Exit EndFunc ;==>Exit_Now Edited November 13, 2005 by thatsgreat2345 Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted November 13, 2005 Moderators Share Posted November 13, 2005 If ; is the starting point of an "If" statement ElseIf ; if you want to add something with a definition Else ; after one of the above if there is no other alternatives If 1 < 0 Then do something ElseIf 2 > 3 Then do Something Else Nothing above were true so do this!! Endif Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted November 13, 2005 Moderators Share Posted November 13, 2005 BTW... you really don't have anything right up there... your going to get error after erro, your $count(s) are off even.Think you should maybe, take a look at the help file for If / ElseIf / Variables etc...If Not FileExists($PIC_ONE) Then FileInstall("E:\stupid.jpg", @TempDir & "\stupid.jpg")EndIfIf Not FileExists($PIC_TWO) Then FileInstall("E:\stupid1.jpg", @TempDir & "\stupid1.jpg")EndIfIf Not FileExists($PIC_THREE) Then FileInstall("E:\stupid3.jpg", @TempDir & "\stupid2.jpg")EndIfIf Not FileExists($PIC_FOUR) Then FileInstall("E:\stupid3.jpg", @TempDir & "\stupid3.jpg")EndIfEven in the bold print your installing the same picture and naming it 2 different things on the install. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted November 13, 2005 Author Share Posted November 13, 2005 (edited) lol confused me more so hows it supposed to go if i want to add another picture just put an else and modify the next thing or what cuz that doesnt work just asks for an endif so would i have to start another if statement? i fixed it but im still confused im been tryin gto figure it out all day and havent cuz i suck Edited November 13, 2005 by thatsgreat2345 Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted November 13, 2005 Moderators Share Posted November 13, 2005 Read the topics I've gave you very slowly (If/ElseIf) and (Variables), you'll understand, even if you have to read them 100 x's, it's better to have the knowledge, then what I did writing it out for you, but after 3 months you should grasp the generalization at least. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. 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