Jump to content

MythBusted

Members
  • Posts

    14
  • Joined

  • Last visited

Everything posted by MythBusted

  1. I believe I found the problem. However, I don't know how to fix it or work around it. It seems that while the ProcessData function is executing, no other functions may simultaneously run, nor will ProcessData stop in order to give StopButtonclick a chance to run briefly, changing the value of $stop. It seems AutoIT is a single-thread application. I placed a message box within StopButtonclick. When ProcessData is running, nothing will happen no matter how many times I press the stop button. However, once ProcessData completes, a multitude of message boxes pop up, equal to the number of times I pressed the stop button. These boxes indeed show the correct $stop = 1 value, but it's too late - ProcessData has already completed. Any thoughts on how I can work around this will be greatly appreciated. Thanks again!
  2. Thanks for your help Manadar! However, I still get the same problem. It seems once inside the "ProcessData" function, and within that loop, $stop never gets read until after the function has completed and returned, no matter how many times I click the stop button.
  3. The code is quite long. For the sake of not flooding this with unnecessary stuff I've only posted the related sections: ; The button declaration for the GUI $StopButton = GUICtrlCreateButton("Cancel Data Processing", 268, 168, 195, 49, 0) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetOnEvent(-1, "StopButtonclick") ; The stop button event handler Func StopButtonclick(); Cancel post-processing Global $stop = 1 EndFunc ; Code snippet from the running process which I want to stop with this button Func ProcessData() For $i = 0 to $dataLimit If GUICtrlRead($StopButton) = Then $oExcel.Quit ProgressOff() MsgBox(48, "Warning!", "Post-processing was halted prior to completion. All required files might not have been created.") Return Else ; Keep going EndIf . . . Next Endfunc As a side note, all the other GUIOnEvent functions work fine. Thanks again!
  4. I've created a GUI which has a start pushbutton which runs a process which varies in time according to the size of the given dataset. I want to give the user the option of bailing out before the process completes, so I added a stop pushbutton and defined a GUICtrlSetOnEvent for it. When I start the process, I periodically monitor the state of a variable which is set within the stop button's event handler function, to see if the stop button has been clicked or not. However, once I'm inside this function it seems that AutoIT cannot read the state of the stop button. It only starts reading it once the process is complete. I'd be most grateful if anyone can point to what I'm doing wrong, or if this is a limitation within AutoIT. Thanks!
  5. Well, I just moved those GUI lines of code higher up in that file, and the darned thing started to work. The lines of code before that GUI snippet were related to a label. Here it is just in case anyone has any ideas: $Label5 = GUICtrlCreateLabel("Visualization Processing Tool", 328, 24, 238, 24) GUICtrlSetFont(-1, 12, 800, 4, "MS Sans Serif") $Label6 = GUICtrlCreateLabel("Select All Images to be Combined Into Output Image", 110, 88, 300, 17) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") GUICtrlSetOnEvent(-1, "ALabel6Click") Thanks again for your help
  6. Bummer!!! I wonder what's wrong with this? I know it's not an infinite loop, since all buttons work fine in all the sequences I've tried so far. I'll try streamlining the code a bit in order to post it here. Thanks again!
  7. I'm using AutoIT v.3.2.0.1. I created a GUI using Koda. All of the functions that are created by GUICtrlSetOnEvent() work fine, with the exception of one. This function is never executed when the event occcurs. I checked the return status of that particular GUICtrlSetOnEvent() call and it returns sccessfully. Here's the offending part of the code. Perhaps it's something obvious that I'm overlooking: $ViewImageButton = GUICtrlCreateButton("View Processed Image", 178, 350, 171, 25, 0) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetOnEvent(-1, "ViewButtonclick") . . . Func ViewButtonclick() $ImageArray = GetImageList($ItemList2) EndFunc ViewButtonclick() never gets called when the "ViewButtonclick" event occurs. However, all other event-triggered functions work fine. Thanks in advance for your help!
  8. "FileSelectFolder()" is exactly what I was looking for!!!!! Thanks so much for your help!!!
  9. This is something that has probably been answered quite a few times, so I apologize for bringing it up once more. I've had limited luck searching for an answer. I'm developing a script where I have an input control in my GUI. In this input box I ask the user for the path of the working directory. But rather than just have the user type the whole path, I'd like to have an option similar to any Windows application to be able to browse the mapped local and/or remote directories with a Windows explorer type of window, and have the user select the directory from this browser window. I haven't figured out a way to do this, so many thanks in advance for any help you can give me. Thanks again!
  10. Has anyone recently done any work in automating GIMP? I've done some experimentation but have found quite a few problems, such as, for example, the window functions (WinActivate(), WinWaitActive()) don't seem to work with GIMP. Thanks!
  11. Great! Thanks so much for your help!
  12. Hi folks, I'm trying to find how to take an active sheet in Excel and move it to the beginning of the workbook. Has anyone had to do something like that, and could explain it to me? Thanks!
  13. Hi folks, I've just started using AutoIT v3. I've spent the last week or so developing an Excel script using AutoIT. Why not create an Excel macro, you ask? Well, I need to tie this script in to other future AutoIT scripts, since I'm developing one big app which accesses three other programs, aside from Excel, and I'd rather use the same IDE for all if them. Well, back to my question. I've tried to send a CTRL-SHIFT-END (selects all cells from the active cell until the end of the worksheet) command to Excel, but it doesn't seem to like that sequence. My Send command looks like: Send("^{SHIFTDOWN}{END}{SHIFTUP}{ENTER}") When I send a CTRL-END command, it works fine. It doesn't like the SHIFT part. Am I doing something wrong, or could this be a possible bug? Thanks so much for your assistance!
  14. Sorry folks, I posted this in the wrong forum. I've alreay moved it to the v3 forum.
×
×
  • Create New...