Jump to content

Omga4000

Active Members
  • Posts

    54
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Omga4000's Achievements

Wayfarer

Wayfarer (2/7)

1

Reputation

  1. Please have a look at GUICtrlSetState function. more specifically: $GUI_ENABLE and $GUI_DISABLE. Good luck, Omga4000.
  2. Hey M23, Sorry - read the entire post and did as mentioned. It now stores the UDF in an external location. I know how to post AutoIt links of course - used it in this topic a few times I've wrote comments in the GUI region so you'd know what I need to be extended (although it is pretty obvious). #include <ButtonConstants.au3> #include <ComboConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <ProgressConstants.au3> #include <SendMessage.au3> #include <GUIExtender.au3> #Region ### START Koda GUI section ### Form=b:\2) programs\autoit3\koda 1.7.3.0\forms\diablo iii auto-gem v1.kxf $Form1 = GUICreate("Form1", 330, 380, 779, 310) $Num_of_Radiants_Label = GUICtrlCreateLabel("Num. of Radiants(1-24):", 16, 8, 116, 17) $Num_of_Radiants_Input = GUICtrlCreateInput("", 16, 32, 105, 21) $Label1 = GUICtrlCreateLabel("Start From:", 168, 8, 55, 17) $Start_From_Combo = GUICtrlCreateCombo("", 168, 32, 145, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL)) GUICtrlSetData(-1, "Perfect Square|Radiant Square|Star|Flawless Star|Perfect Star|Radiant Star", "Perfect Square") ;;;; ;;Would like this to be extended - Starting here;; $Flaw_SQR_Label = GUICtrlCreateLabel("Flawless Square Needed:", 48, 112, 125, 17) $Flaw_SQR_Input = GUICtrlCreateInput("", 176, 108, 105, 21) $Perf_SQR_Label = GUICtrlCreateLabel("Perfect Square Needed:", 48, 145, 119, 17) $Perf_SQR_Input = GUICtrlCreateInput("", 176, 141, 105, 21) $Rada_SQR_Label = GUICtrlCreateLabel("Radiant Sqaure Needed:", 48, 178, 122, 17) $Rada_SQR_Input = GUICtrlCreateInput("", 176, 174, 105, 21) $Star_Label = GUICtrlCreateLabel("Star Needed:", 48, 211, 67, 17) $Star_Input = GUICtrlCreateInput("", 176, 207, 105, 21) $Flaw_Star_Label = GUICtrlCreateLabel("Flawless Star Needed:", 48, 244, 110, 17) $Flaw_Star_Input = GUICtrlCreateInput("", 176, 240, 105, 21) $Perf_Star_Label = GUICtrlCreateLabel("Perfect Star Needed:", 48, 277, 104, 17) $Perf_Star_Input = GUICtrlCreateInput("", 176, 273, 105, 21) $Tome_Label = GUICtrlCreateLabel("Tome of Secrets Needed:", 48, 310, 126, 17) $Tome_Input = GUICtrlCreateInput("", 176, 306, 105, 21) ;;Ending Here;; ;;;; $OK_Button = GUICtrlCreateButton("Go!", 127, 344, 75, 25) $Calc_Label = GUICtrlCreateLabel("Calculations:", 29, 80, 64, 17) ;;;; ;;This is the button that should activate the extension process;; $Calc_Button = GUICtrlCreateButton("-->", 96, 77, 27, 20) ;;Ending here;; ;;;; GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $Flaw_to_Rada = 729 $Perf_to_Rada = 243 $Rad_to_Rada = 81 $Star_to_Rada = 27 $Flaw_Star_to_Rada = 9 $Perf_Start_to_Rada = 3 $Tome_Flaw_to_Rada = 1631 $Tome_Perf_to_Rada = 902 $Tome_Rad_to_Rada = 416 $Tome_Star_to_Rada = 173 $Tome_Flaw_Star_to_Rada = 65 $Tome_Perf_Start_to_Rada = 20 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Start_From_Combo OR $Num_of_Radiants_Input $Start_From = GUICtrlRead($Start_From_Combo) $Num_Rada = GUICtrlRead($Num_of_Radiants_Input) If $Start_From = "Perfect Square" Then GUICtrlSetData($Flaw_SQR_Input, 729*$Num_Rada) GUICtrlSetData($Perf_SQR_Input, 243*$Num_Rada) GUICtrlSetData($Rada_SQR_Input, 81*$Num_Rada) GUICtrlSetData($Star_Input, 27*$Num_Rada) GUICtrlSetData($Flaw_Star_Input, 9*$Num_Rada) GUICtrlSetData($Perf_Star_Input, 3*$Num_Rada) GUICtrlSetData($Tome_Input, 1631*$Num_Rada) EndIf If $Start_From = "Radiant Square" Then GUICtrlSetData($Flaw_SQR_Input, 0) GUICtrlSetData($Perf_SQR_Input, 243*$Num_Rada) GUICtrlSetData($Rada_SQR_Input, 81*$Num_Rada) GUICtrlSetData($Star_Input, 27*$Num_Rada) GUICtrlSetData($Flaw_Star_Input, 9*$Num_Rada) GUICtrlSetData($Perf_Star_Input, 3*$Num_Rada) GUICtrlSetData($Tome_Input, 902*$Num_Rada) EndIf If $Start_From = "Star" Then GUICtrlSetData($Flaw_SQR_Input, 0) GUICtrlSetData($Perf_SQR_Input, 0) GUICtrlSetData($Rada_SQR_Input, 81*$Num_Rada) GUICtrlSetData($Star_Input, 27*$Num_Rada) GUICtrlSetData($Flaw_Star_Input, 9*$Num_Rada) GUICtrlSetData($Perf_Star_Input, 3*$Num_Rada) GUICtrlSetData($Tome_Input, 416*$Num_Rada) EndIf If $Start_From = "Flawless Star" Then GUICtrlSetData($Flaw_SQR_Input, 0) GUICtrlSetData($Perf_SQR_Input, 0) GUICtrlSetData($Rada_SQR_Input, 0) GUICtrlSetData($Star_Input, 27*$Num_Rada) GUICtrlSetData($Flaw_Star_Input, 9*$Num_Rada) GUICtrlSetData($Perf_Star_Input, 3*$Num_Rada) GUICtrlSetData($Tome_Input, 173*$Num_Rada) EndIf If $Start_From = "Perfect Star" Then GUICtrlSetData($Flaw_SQR_Input, 0) GUICtrlSetData($Perf_SQR_Input, 0) GUICtrlSetData($Rada_SQR_Input, 0) GUICtrlSetData($Star_Input, 0) GUICtrlSetData($Flaw_Star_Input, 9*$Num_Rada) GUICtrlSetData($Perf_Star_Input, 3*$Num_Rada) GUICtrlSetData($Tome_Input, 65*$Num_Rada) EndIf If $Start_From = "Radiant Star" Then GUICtrlSetData($Flaw_SQR_Input, 0) GUICtrlSetData($Perf_SQR_Input, 0) GUICtrlSetData($Rada_SQR_Input, 0) GUICtrlSetData($Star_Input, 0) GUICtrlSetData($Flaw_Star_Input, 0) GUICtrlSetData($Perf_Star_Input, 3*$Num_Rada) GUICtrlSetData($Tome_Input, 20*$Num_Rada) EndIf Case $OK_Button EndSwitch WEnd Thank you for being so patient with me! Regards, Omga4000.
  3. Thank you for commenting M23 I've placed GUIExtender.au3 inside "AutoIt3Include" and included your file in the following way: #include <GUIExtender.au3> Do I also need to add the other files to this folder? (the example files) Also - for creating a scenario where I want the program to extend the window do I use this? $iCalc_Section = _GUIExtender_Section_Start($hGUI, 80, 110) //All of the GUI content here _GUIExtender_Section_End($hGUI) Thanks again
  4. I've tried using M23's script - but I keep receiving error after error.. What variables should I declare before running my script? This is what I declared: Global $aGUIExt_GUI_Data[1][2] = [[0, 0]] Global $aGUIExt_Obj_Data[1][2] = [[0]] Global $fGUIExt_SectionAction = False Local $aActive_Section_Data[1][9] = [[0, 0, 1, 0, "", 9999]] And now it says: I've searched M23's file yet I didn't find the place he declares iGUI_Index. .
  5. Thank you, will do Oh no sir, there is no need.
  6. Hey I've created a simple GUI with 1 window. is there a way to make a retractable window that opens once you press button X? For example: This is the window I have (just for example, this is actually MSI Afterburner) I want to be able to "pull" another window from the right once a button is pressed, like this: How do I do that? Thank you, Omga4000
  7. Hello I am trying to build a script and when attempting to write in Hebrew I get "?????" instead of the true letters. I did manage to write in Hebrew on other scripts, but not in this new one I am trying to build. Is this a known issue? Fixable? Thank you, Omga4000 EDIT: Self-facepalm Changed encoding to UTF-8, works great!
  8. Eureka! My mistake was I accidently thought the controller ID is $Make_Room_Read, however, this is the return for marked or not and not the controller ID. Stupid me! By creating a MsgBox with $Make_Room and $Beep I was able to receive their controller ID (which was 8 and 9 respectively). Now the full script is functioning perfectly. Thank you for directing me BrewManNH! Best Regards, Omga4000.
  9. Hello! I've made this script a year ago and I have been asked by people to post my final script so they can use it. This is nothing fancy, but just thought of sharing it with the community Script purpose and explanation: Search for a word / sentence* inside .txt and .log files (you may add more extensions)Search in sub-directories - Will search in main folder + all of the folders in the main folders if checked.Save a new log with the paths of the files containing the word / sentenceBugs are still available as I used it personally and knew how NOT to cause it to crash so this is not bug-free.This is very very usable however and shouldn't crash at all if used correctly. *Please note: In case of searching for a sentence, it will only return files containing the sentence in it's full. For example: Searching for "I am walking" will only return files containing "I am walking" and not files with "I", with "am" and "walking" in separate. Enjoy Search In Files_With GUI - By Kfir v1.1.au3
  10. Hey all I've managed to get GUICtrlSetState working - but I actually didn't understand how I did it! (The full script is 300+ lines, so i will just post what's necessary) This is my script have in my script: $Make_Room = GUICtrlCreateCheckbox("Make Room?", 40, 64, 97, 17) $Make_Room_Read = GUICtrlRead($Make_Room) if $Make_Room_Read = 1 Then GUICtrlSetState(-1,$GUI_UNCHECKED) EndIf So this is working perfectly, but how?! Where exactly did I tell it to uncheck this specific checkbox? What happens in case I more than 1 checkboxes, like this: $Make_Room = GUICtrlCreateCheckbox("Make Room?", 40, 64, 97, 17) $Beep = GUICtrlCreateCheckbox("Beep?", 40, 84, 97, 17) In this case - how do I define which Check box I want to be unchecked? They both return "1" when checked and both return "4" when unchecked. Thank you, Omga4000
  11. Thank you, that works beautifully! However, now I have another problem. The program doesn't recognize "1,000" as "1000", but as "1". Do I need to define the numbers as Int?
  12. Hello I was wondering if it is possible to create a function that constantly checks the Input to see if Digit Grouping is needed. (For example: If I write 1000 it automatically changes it to 1,000. Like the calculator does) My code has Hebrew writing, but it shouldn't bother you much. Here is my code: #include #include #include #include #include #include #Region ### START Koda GUI section ### Form=c:\program files (x86)\autoit3\koda 1.7.30\forms\form1.kxf $GoogleForm = GUICreate("Google Adwords", 321, 505, 617, 237) $Budget_Label = GUICtrlCreateLabel("תקציב לפרסום בגוגל", 192, 24, 113, 17) $Budget_Input = GUICtrlCreateInput("", 48, 20, 121, 21) $Camp_Cost_Label = GUICtrlCreateLabel("*עלות ניהול קמפיין", 199, 68, 105, 17) $Camp_Cost_Input = GUICtrlCreateInput("", 48, 64, 121, 21, $ES_READONLY) $Click_Label = GUICtrlCreateLabel("עלות קליק (ממוצע)", 200, 112, 101, 17) $Click_Input = GUICtrlCreateInput("", 48, 108, 121, 21) $Land_Label = GUICtrlCreateLabel("*דף נחיתה ייעודי", 207, 156, 93, 17) $Land_Input = GUICtrlCreateInput("", 48, 152, 121, 21) $Phone_Label = GUICtrlCreateLabel("*פלאפון ייעודי", 220, 200, 84, 17) $Phone_Combo = GUICtrlCreateCombo("", 48, 196, 121, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL), $WS_EX_LAYOUTRTL) GUICtrlSetData(-1, "לא|כן - ₪200") $Profit_Label = GUICtrlCreateLabel("רווח מלקוח", 237, 244, 63, 17) $Profit_Input = GUICtrlCreateInput("", 48, 240, 121, 21) $Closing_Label = GUICtrlCreateLabel("יחס סגירה", 244, 288, 57, 17) $Closing_Combo = GUICtrlCreateCombo("", 49, 284, 121, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL), $WS_EX_LAYOUTRTL) GUICtrlSetData(-1, "1 מתוך 10|2 מתוך 10|3 מתוך 10|4 מתוך 10|5 מתוך 10|6 מתוך 10|7 מתוך 10|8 מתוך 10|9 מתוך 10|10 מתוך 10") $OK_Button = GUICtrlCreateButton("!חשב", 136, 328, 75, 25) $Expense_Label = GUICtrlCreateLabel("הוצאה שנתית", 213, 372, 74, 17) $Expense_Input = GUICtrlCreateInput("", 64, 368, 121, 21) $Income_Label = GUICtrlCreateLabel("הכנסה שנתית", 217, 416, 73, 17) $Income_Input = GUICtrlCreateInput("", 64, 412, 121, 21) $Total_Label = GUICtrlCreateLabel ("סה''כ רווח שנתי", 205, 460, 85, 17) $Total_Input = GUICtrlCreateInput("", 64, 456, 121, 21) $Label1 = GUICtrlCreateLabel("תשלום חד-פעמי*", 249, 488, 70, 17) GUICtrlSetFont(-1, 8, 400, 0, "MS Serif") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $OK_Button $Budget = GUICtrlRead($Budget_Input) If $Budget >= 10000 Then GUICtrlSetData($Camp_Cost_Input, "30%") EndIf If $Budget <= 10000 AND $Budget >= 0.01 Then GUICtrlSetData($Camp_Cost_Input, "15%") Else MsgBox (1, "!שגיאה", "!אנא הכנס תקציב") EndIf $Click = GUICtrlRead($Click_Input) $oLand = GUICtrlRead($Land_Input) If $oLand >= 1 AND $oLand <=9 Then ;Calculates the total cost of Landing Pages - Case 1-9 $nLand = $oLand * "550" $fLand = $oLand & " x" & " 550" & "₪" & " = " & $nLand & "₪" $var = StringMid($fLand, 1, 1) _ResetInput($Land_Input) $nLand = $var * "550" $fLand = $var & " x" & " 550" & "₪" & " = " & $nLand & "₪" GUICtrlSetData($Land_Input, $fLand) EndIf If $oLand >= 10 AND $oLand <=99 Then ;Calculates the total cost of Landing Pages - Case 10-99 $nLand = $oLand * "550" $fLand = $oLand & " x" & " 550" & "₪" & " = " & $nLand & "₪" $var = StringMid($fLand, 1, 2) _ResetInput($Land_Input) $nLand = $var * "550" $fLand = $var & " x" & " 550" & "₪" & " = " & $nLand & "₪" GUICtrlSetData($Land_Input, $fLand) EndIf If $oLand >= 100 Then ;Special order for god damn rich people! MsgBox(1, "יש כסף, אה?", ":יא טחון.. צלצל להצעה" & @CR & "052-5317772") $nLand = "1" EndIf $Phone = GUICtrlRead($Phone_Combo) If $Phone = "כן - ₪200" Then $Phone = 200 Else $Phone = 0 EndIf $Profit = GUICtrlRead($Profit_Input) $Closing = GUICtrlRead($Closing_Combo) $oExpense = $Budget*12 + $nLand + $Phone $Expense = GUICtrlSetData($Expense_Input, $oExpense) ;Total Expense $oBudget = GUICtrlRead($Budget_Input) $oClick = GUICtrlRead($Click_Input) $oClosing = GUICtrlRead($Closing_Combo) $oProfit = GUICtrlRead($Profit_Input) If $oClosing = "1 מתוך 10" Then $oCash = $oBudget / $oClick * 0.1 * $oProfit * 12 GUICtrlSetData($Income_Input, $oCash) ;Total income 1/10 EndIf If $oClosing = "2 מתוך 10" Then $oCash = $oBudget / $oClick * 0.2 * $oProfit * 12 GUICtrlSetData($Income_Input, $oCash) ;Total income 2/10 EndIf If $oClosing = "3 מתוך 10" Then $oCash = $oBudget / $oClick * 0.3 * $oProfit * 12 GUICtrlSetData($Income_Input, $oCash) ;Total income 3/10 EndIf If $oClosing = "4 מתוך 10" Then $oCash = $oBudget / $oClick * 0.4 * $oProfit * 12 GUICtrlSetData($Income_Input, $oCash) ;Total income 4/10 EndIf If $oClosing = "5 מתוך 10" Then $oCash = $oBudget / $oClick * 0.5 * $oProfit * 12 GUICtrlSetData($Income_Input, $oCash) ;Total income 5/10 EndIf If $oClosing = "6 מתוך 10" Then $oCash = $oBudget / $oClick * 0.6 * $oProfit * 12 GUICtrlSetData($Income_Input, $oCash) ;Total income 6/10 EndIf If $oClosing = "7 מתוך 10" Then $oCash = $oBudget / $oClick * 0.7 * $oProfit * 12 GUICtrlSetData($Income_Input, $oCash) ;Total income 7/10 EndIf If $oClosing = "8 מתוך 10" Then $oCash = $oBudget / $oClick * 0.8 * $oProfit * 12 GUICtrlSetData($Income_Input, $oCash) ;Total income 8/10 EndIf If $oClosing = "9 מתוך 10" Then $oCash = $oBudget / $oClick * 0.9 * $oProfit * 12 GUICtrlSetData($Income_Input, $oCash) ;Total income 9/10 EndIf If $oClosing = "10 מתוך 10" Then $oCash = $oBudget / $oClick * $oProfit * 12 GUICtrlSetData($Income_Input, $oCash) ;Total income 10/10 EndIf $var1 = GUICtrlRead($Expense_Input) $var2 = GUICtrlRead($Income_Input) $Total_Income_Cash = $var2 - $var1 GUICtrlSetData($Total_Input,$Total_Income_Cash) EndSwitch WEnd Func _ResetInput($Land_Input) GUICtrlSetData($Land_Input, "") EndFunc Anyone mind helping? Best Regards, Omga4000.
  13. Thank you very much. You have helped me a lot!
  14. Didn't quite get what you meant.. I've tried: FileWrite($aFile, _GetFilename) Btu that obviously didn't work since this isn't even a correct syntax How am I supposed to use a Func in FileWrite?
  15. Thanks for explaining me what does UDF mean, Though I still didn't quire get it. Nice, Works perfectly! I obviously didn't underd why does "/C:" fixes the problem, and I'd love an explanation. Now the only problem I have is with the log file. I use this: _FileWriteLog($Save_Log_Text & "Log.txt" ,$aArray[$i]) This creates a long and unnecessary string of information (Including Date, Time and a Full Path) Basically all I need if to write the file name (without the full path). I don't think there's a way to change it since this is an integrated function in AutoIt. Got any idea how to write the file name only?
×
×
  • Create New...