Jump to content

peterbonge

Members
  • Posts

    14
  • Joined

  • Last visited

peterbonge's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Now I've found out that only disabling the first button causes this problem. It's strange... I've posted it to the bugs forum.
  2. I see you don't understand me: I have no problems with disabling buttons. But when a button is disabled the helpfile (F1) defined with GuiCreateEx doesn't work anymore. Button enabled -> F1 works Button disabled -> F1 doesn't work
  3. Hello again... Under certain circumstances 2 buttons of my gui are disabled. In this case the helpfile defined with GuiCreateEx("notepad readme.txt", -1, icon.ico) doesn't work anymore. If I'm removing the lines GuiSetControlEx($but1,128) GuiSetControlEx($but1,128) it works fine again... By the way: Is it possible to open other formats with GuiCreateEx than just textfiles?
  4. Yes, it's a relative simple gui with 4 buttons. So I don't want to use a loop or AdLib. My solution so far is: GuiCreate("Titel") ... GuiWaitClose() If GuiRead() = $butMove Then ... ElseIf GuiRead() = $butCopy Then ... ElseIf GuiRead() = $butConfig Then ... Else Exit EndIf
  5. I've problems with closing my gui with the red X: GuiCreate("Titel") ... GuiWaitClose() If GuiRead() = $butMove then ... If GuiRead() = $butCopy then ... If GuiRead() = $butConfig Then ... If GuiRead() = $butCancel OR GuiMsg(0) = -3 Then Exit With the build before 10th June this worked fine. Now it doesn't. If I change the code to "GuiMsg() = -3" (without the 0) it works, but I have to click twice on the X (or once on the X and once on any other button. Am I doing something wrong or is this a bug? Edit: Now I've noticed that with "GuiMsg() = -3" all other buttons doesn't work anymore. They are all closing the gui, but only after 2 clicks. Maybe I must solve this with If...ElseIf...Else...EndIf. Closing a gui when not using GuiWaitClose() is no problem. Strange...
  6. Both ;-) I know that loops are raising the CPU to 100%. Because of this I've put the sleep command into the loop of the config function. I think the whole program would be slowed down if I would put the main function into a loop with a sleep command. If this is true it wouldn't be the better way. My solution is slow enough... I thought that my solution is ok all the time. Just the other post is confusing me. There was a loop suggested as the better way and I still don't understand this.
  7. Sorry. I forgot to login. The previous post is from me...
  8. In between I've put the script and all files temporary on my webspace: httq://www... The script is already translated. But the textfiles are still in German... Edit: Now I've finished my tool/script (source code included): httq://www... Edit2: Sorry, but I'm going to remove that website because of another website...
  9. I don't know if I should post the whole code. It has more than 250 lines and there are a lot of german strings. And there are some more files which are needed by the script (icons, textfiles)... I've had some doubts because of this post. I don't know if I have also "a flow issue in your logic"... I thought I've read elsewhere that only one gui at the same time is possible, isn't it? Nevertheless it is not really necessary that both guis are open at the same time. By the way: It is a (german) tool to copy images from a digital camera to a dated folder on the harddisk. And now I go to bed...
  10. I've divided my script into several functions for a better overview. Here is a basic overview of the script: Init() MainGUI() Processing() Exit Func Init() ;some code EndFunc Func MainGUI() ;some code ;a gui GuiWaitClose() If GuiRead() = $buttonConfig Then Config() EndFunc Func Processing() ;Some Code EndFunc Func Config() ;a gui with a while loop and exitloop GuiDelete() MainGUI(); to rerun the func MainGUI EndFunc A click on the config button in the main gui calls the function Config with the config gui. Closing the config gui returns to the function MainGUI. At the moment I'm just calling the function MainGUI at the end of the config function. It seems to work fine but I would like to know if there is a better way to do this.
  11. Ah yes, now it works. Great example. Thanx!
  12. I want to change some objects within the gui without closing the gui. In my test script I have two labels and 3 buttons. The first button shall change the first label, the second button shall change the second label and the third button shall close the gui. Here is the script: #include <GUIConstants.au3> GuiCreate("Test", 300,90) $Text1 = GuiSetControl("label", "Text1", 10,10,100,15) $Text2 = GuiSetControl("label", "Text1", 10,25,100,15) $Button1 = GuiSetControl("button", "Change 1", 10,55,80,25) GuiSetControlNotify() $Button2 = GuiSetControl("button", "Change 2", 100,55,80,25) GuiSetControlNotify() $Button3 = GuiSetControl("button", "Cancel", 190,55,80,25) While GuiMsg() = 3 GuiWrite($Text1, 0, "Changed Text1") Wend While GuiMsg() = 4 GuiWrite($Text2, 0, "Changed Text2") Wend If $Button3 = GuiRead() Then msgbox(0,"Message", "Cancel button pushed.") GuiDelete() But this doesn't work. I can change both labels. But sometimes I have to click twice on the buttons and sometimes the change buttons are closing the gui. I think the "message queue" noted in this post would help. Or is there any other way?
×
×
  • Create New...