Jump to content

Rater

Members
  • Posts

    11
  • Joined

  • Last visited

Everything posted by Rater

  1. Noob wondering about a noob thing that this noob doesn't know the answer to: If one changes the Opt ("MouseClickDelay", "") from the default of 10 down to 0, will this cause PROBLEMS FOR THE CORRECT EXECUTION OF THE SCRIPT because it's too fast or something? Same goes for Opt ("MouseClickDownDelay", "") settings. [[[[[[[in other words : Why the heck is the default speed set to 10 and not 0 and am I hurting my script if I set things on max speed ????]]]]]]]]]
  2. Yes, deleting the spaces works like a charm. If only I'd known this about 6 hours ago. Also, man that's weird that the control ID doesn't cut it...I got the idea from the Help file. Anyways thanks guys for helping!
  3. Yep. Thanks.
  4. Not sure how best to explain this problem. Seems easiest to have you run this script: If you run this script a couple different times, tweaking it very slightly per my instructions below, you will see the problem right away. (see the "TEST HERE" section in the code) Code as of right now: CASE (A): When "$5.00" is selected in "Budget" combo box, MsgBox reads and returns the text in "Type" column. This works just fine. You can make changes to the "Type" column all day long and MsgBox will always return an accurate result. Great. CASE B: However, if you change the code to say "$6.00 (or any other value besides $5.00)" , MsgBox fails. Here's what I'm trying to do: For each different combination of values selected from the 3 columns in the parent window, when I press "Yes" in the child window, the script will then perform a unique operation. The script seems to almost be working, but I can't get it any closer. I've tried as many things as my noob knowledge will allow, and am now completely out of ideas. Thanks for helping...... CODE#cs ---------------------------------------------------------------------------- AutoIt Version: 3.2.11.0 (beta) Author: myName Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- #include <GUIConstants.au3> #include <GUIComboBox.au3> $Parent_Win = GUICreate("schedule", 700, 300) GUISetBkColor(0xCCBBFF) GUISetState(@SW_SHOW) GUICtrlCreateLabel("budget", 188, 35) GUICtrlCreateLabel("quantity", 325, 35) GUICtrlCreateLabel("type", 455, 35) $box1 = GUICtrlCreateCombo("$5.00", 150, 91, 120, 10) GUICtrlSetData($box1, "$6.00 |$7.00 |$8.00") $box2 = GUICtrlCreateCombo("1 pound", 287, 91, 120, 10) GUICtrlSetData($box2, "2 pounds |3 pounds") $box3 = GUICtrlCreateCombo("apples", 425, 91, 120, 10) GUICtrlSetData($box3, "oranges |grapes") $button1 = GUICtrlCreateButton("compute", 250, 220, 130, 40) $Child_Win = GUICreate("START", 330, 150, 400, 300, $WS_CAPTION, -1, $Parent_Win) GUICtrlCreateLabel("compute?", 20, 30, 300, 25, $SS_CENTER) GUICtrlSetColor(4102, 0x0000) GUICtrlSetFont(4102, 10, 550) GUISetBkColor(0xCCBBFF, $Child_Win) $button2 = GUICtrlCreateButton("yes", 60, 80, 80, 30) GUICtrlSetFont(4103, 10, 600) $button3 = GUICtrlCreateButton("no", 190, 80, 80, 30) GUICtrlSetFont(4104, 10, 600) While 1 $msg = GUIGetMsg() $budget = GUICtrlRead(6) $quantity = GUICtrlRead(7) $type = GUICtrlRead(8) If $msg = $button1 Then GUISetState(@SW_SHOW, $Child_Win) EndIf If $msg = $button3 Then GUISetState(@SW_HIDE, $Child_Win) EndIf =================================================================== ; FYI: ; "$button2" is the "Yes" button in child window ; when code says "$5.00" below, user can manually select any value in the "Type" column of parent window, and MsgBox works all day long. ; when code is changed to "$6.00" below, Msgbox stops working ; TEST HERE BEGIN ======================================================= If $msg = $button2 And $budget = "$5.00" Then MsgBox(0, "type is", $type) EndIf ; TEST HERE END ========================================================= Select Case $msg = $GUI_EVENT_CLOSE GUIDelete() Exit EndSelect WEnd
  5. Thank you, Martin. Very good idea.
  6. Cannot find any info on this: When my script creates a GUI with a combo box, the default text visible in the combo box arrives "activated" (i.e. highlighted blue). I want to change this so that when the GUI arrives, the combo box text is NOT highlighted blue (or any other color). Possible ???
  7. bogQ: That's gotta be it. Thanks man!! TY also everyone who replied!!
  8. Awesome thanks. Any idea why mouseclicks aren't working ??
  9. This is the exact code I used: ControlSend("Greeting", "Hello World!", 6, "{ENTER}")oÝ÷ ØÚÇßÙ¬µªíx-£ 'uêâ|hm«ÞjènW¦Â+a)¨ºÇ®+Þ®ì¢g­)à½êæÊj.±ç%É,ì(®L"¶ayú%".¶-6^¥§SºÚ+©¡×ºÚ"µÍÂ[ ][ÝÛÝY^I][ÝÊBÚ[ØZ]XÝ]J ][ÝÕ[]YHÝY ][ÝÊBÙ[ ][ÝÒIÌÎNÛHXÚÈ[YË]Ú ][ÝÊBÛY BÚ[ÛÜÙJ ][ÝÕ[]YHÝY ][ÝÊBÚ[ØZ]XÝ]J ][ÝÓÝY ][ÝË ][ÝÑÈ[ÝHØ[ÈØ]HHÚ[ÙÏÉ][ÝÊBÙ[ ][ÝÉÌÌÎÛ][ÝÊ It's gotta be something really stupid, but I have no idea what.
  10. OK, so the control ID for the Yes button is 6. I tried the following code, no dice. =================================== ; Script Start - Add your code below here MsgBox(900, "Greeting", "Hello World!") ControlSend("Greeting", "Hello World!", 6, "Yes") ===================================
  11. So I can't get AutoIt to execute Mouseclicks. Uber Noob, but I've searched and read quite a bit about this. Below are my 2 best attempts. Neither one is working. The "MsgBox" creates a message box with 2 buttons: Yes and No. I'm simply trying to get the mouse to click "Yes" to close the message box. I've triple-checked the coordinates, and they are correct. Am I retarded or something? TY for your help!! ===================================(1) ; Script Start - Add your code below here Opt("MouseCoordMode", 0) MsgBox(900, "Greeting", "Hello World!") MouseClick ("left", 50, 100) ===================================(2) ; Script Start - Add your code below here MsgBox(900, "Greeting", "Hello World!") Send("!y")
×
×
  • Create New...