Jump to content

SkellySoul

Active Members
  • Posts

    349
  • Joined

  • Last visited

Recent Profile Visitors

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

SkellySoul's Achievements

Universalist

Universalist (7/7)

3

Reputation

  1. Updated to the new beta I noticed this " Fixed #2908: _ScreenCapture_Capture() failing due to out of bounds error."
  2. This is the error I get "Subscript used on non-accessible variable" not sure what to do also is there a way to disable autoit errors from displaying and simply killing the process instead
  3. Aw thanks didn't think of trying "Opt("TrayIconDebug", 1)" and to be honest im not sure if its hanging or crashing because its gone when I come back. I'll try and run more tests and may be increase speed to see if I can get it to hang/crash
  4. Hi, I am trying to make a project and have left this unattended and for whatever reason when I come back it stops. Is it related to may be this...and if so how do I go about fixing it please. https://www.autoitscript.com/wiki/Recursion #include <Misc.au3> #include <Date.au3> #Include <Timers.au3> #include <ScreenCapture.au3> AdlibRegister("_Pic", 5000) ; How often to capture Global $Folder_Name = @ScriptDir & "\Pics\" & @MON & "-" & @MDAY & "-" & @YEAR _Singleton(@ScriptName) While 1 Sleep(1000) WEnd Func _Pic() If _Timer_GetIdleTime() > 3000 Then ; How long pc has been inactive ;;; Else If Not FileExists($Folder_Name) Then DirCreate($Folder_Name) EndIf $Time = _NowTime() $Time_Split = StringSplit($Time , ":") $Gen = @MON & "-" & @MDAY & "-" & @YEAR & " (" & $Time_Split[1] & "-" & $Time_Split[2] & "-" & $Time_Split[3] & ")" _ScreenCapture_Capture($Folder_Name & "\" & $Gen & ".jpg") EndIf EndFunc
  5. I managed to fix it. I think earlier today I was over thinking the task and made it way more complicated then needed. Thanks again
  6. I was trying to do "(win/lost) * 100" but realized that if they're 0 that won't work because you cannot divide by 0. So I threw in a piece of code that won't return the rate if either of them are at 0. I also know that you have to divide with the lower number first to get the actual percentage and I did that by using a greater than operator ">". For some reason though the code isn't written properly because it doesn't return the proper values. [Edit] $Value_Low = 5 $Value_High = 15 $Value = ($Value_Low / $Value_High) * 100 MsgBox(0 , "", Round($Value, 2)) This is working, ill have to go over my code and find the problem. Appreciate your help!
  7. The rate is the ratio of wins vs lost and total is just the wins and loses added together. I'm just trying to get the percentage of two numbers but it gives me funny results at times.
  8. I have a GUI setup like this Won: 0 Lost: 0 Total: 0 Rate: 100% and a add and subtract button, if I were to push add 5 times and lost 10 times it would look like this Won: 5 Lost: 10 Total: 15 Rate: 50% Sample of my codes add/subtract buttons Case $Add $Wonz = StringTrimLeft(GUICtrlRead($Won), 5) $Subz = StringTrimLeft(GUICtrlRead($Lost), 6) $Totz = StringTrimLeft(GUICtrlRead($Total), 7) GUICtrlSetData($Won, "Won: " & $Wonz +1) GUICtrlSetData($Total, "Total: " & $Totz +1) If Not GUICtrlRead($Wonz) = 0 And Not GUICtrlRead($Subz) = 0 Then If $Wonz > $Subz Then GUICtrlSetData($Rate, "Rate: " & Round($Subz / $Wonz) * 100, 2) Else GUICtrlSetData($Rate, "Rate: " & Round($Wonz / $Subz) * 100, 2) EndIf EndIf Case $Sub $Wonz = StringTrimLeft(GUICtrlRead($Won), 5) $Subz = StringTrimLeft(GUICtrlRead($Lost), 6) $Totz = StringTrimLeft(GUICtrlRead($Total), 7) GUICtrlSetData($Lost, "Lost: " & $Subz +1) GUICtrlSetData($Total, "Total: " & $Totz +1) If Not GUICtrlRead($Wonz) = 0 And Not GUICtrlRead($Subz) = 0 Then If $Wonz > $Subz Then GUICtrlSetData($Rate, "Rate: " & Round($Subz / $Wonz) * 100, 2) Else GUICtrlSetData($Rate, "Rate: " & Round($Wonz / $Subz) * 100, 2) EndIf EndIf This doesn't work though and I cannot wrap my ahead around what im doing wrong [edited] really just need help with this part If $Wonz > $Subz Then GUICtrlSetData($Rate, "Rate: " & $Subz / $Wonz * 100) Else GUICtrlSetData($Rate, "Rate: " & $Wonz / $Subz * 100) EndIf it seems like it should work
  9. Thanks for the help, I got it
  10. I want to detect if I am left clicking or right clicking a label and then it will either up the label +1 or -1 depending on the click. And I guess that explains why the primary was working lol
  11. This works for primary down Case Else For $i = 1 To UBound($Card_Array) -1 $Cursor = GUIGetCursorInfo($GUI) If $Msg = $Data[$i] And $Cursor[2] = 1 Then MsgBox(0 , $Msg ,GUICtrlRead($Data[$i])) Next but this doesn't work for secondary down Case Else For $i = 1 To UBound($Card_Array) -1 $Cursor = GUIGetCursorInfo($GUI) If $Msg = $Data[$i] And $Cursor[3] = 1 Then MsgBox(0 , $Msg ,GUICtrlRead($Data[$i])) Next I think it might be releasing the cursor to fast or something but primary works...weird , mhm
  12. Oops, I figured it out. While 1 $Msg = GUIGetMsg() Switch $Msg Case $GUI_EVENT_CLOSE _Exit() Case Else For $i = 1 To UBound($Data_Array) -1 If $Msg = $Data[$i] Then MsgBox(0 , "",GUICtrlRead($Data[$i])) Next EndSwitch WEnd
  13. I have a GUI that creates a control which is an array and was wondering how I can do something like this While 1 $Msg = GUIGetMsg() Switch $Msg Case $GUI_EVENT_CLOSE _Exit() Case $Data[1] To $Data[UBound($Data_Array) -1] $Result = Case MsgBox(0 , "Test", "You clicked on Data " & $Result) EndSwitch WEnd
  14. Thanks, ill try that when I wake up a little more. Seems to be just what I need though
×
×
  • Create New...