Jump to content

All Activity

This stream auto-updates     

  1. Past hour
  2. Beginner Question

    Or you could do it the long way, like this: #include <MsgBoxConstants.au3> Example() Func Example() Local $iCount = ControlCommand("NVIDIA Control Panel","","[CLASS:Button; TEXT:Maximize 3D pe&rformance]", "IsChecked", "") Local $sResult = "" If $iCount Then $sResult = "Enabled" Else $sResult = "Disabled" EndIf MsgBox($MB_SYSTEMMODAL, "", "NVIDIA Disable/Enable SLI" & @CRLF & @CRLF & "Status: " & $sResult & @CRLF) EndFunc ;==>Example
  3. Beginner Question

    Yeah its fixed. Thank you!
  4. Beginner Question

    Try again...I had an error in the code.
  5. Beginner Question

    Thank you for your help. That does work however it removes all the text like "NVIDIA Disable/Enable SLI" And "Status: " It just returns Enabled or Disabled
  6. Beginner Question

    #include <MsgBoxConstants.au3> Example() Func Example() Local $iCount = ControlCommand("NVIDIA Control Panel","","[CLASS:Button; TEXT:Maximize 3D pe&rformance]", "IsChecked", "") MsgBox( _ $MB_SYSTEMMODAL, _ "", _ "NVIDIA Disable/Enable SLI" & @CRLF & @CRLF & "Status: " & ($iCount ? "Enabled" : "Disabled") & @CRLF _ ) EndFunc ;==>Example
  7. Beginner Question

    Okay, so I'm really stumped with this and I KNOW its a stupid question but I would really appreciate it if some one could lead me in the right direction. #include <MsgBoxConstants.au3> Example() Func Example() Local $iCount = ControlCommand("NVIDIA Control Panel","","[CLASS:Button; TEXT:Maximize 3D pe&rformance]", "IsChecked", "") MsgBox($MB_SYSTEMMODAL, "", "NVIDIA Disable/Enable SLI" & @CRLF & @CRLF & "Status: " & $iCount & @CRLF) EndFunc ;==>Example This is what I have and it returns 1 if its selected and 0 if its not which is great but I was wondering how I could make it so the 1 Shows up as Enabled and the 0 shows up as Disabled (As Text in the MsgBox).
  8. Controlsend

    Yea yea ... you are right, I really should be more considerate for sensitivity of the poor soles like you around here not comprehending when I am serious or writing something with "Tongue-in-cheek" ... won't happen again I hope. Jos
  9. Today
  10. @nacerbaaziz Because you use a screen reader, the ampersands are probably not getting translated correctly because they are immediately before an equal sign. To make the function work correctly, you need to modify 2 lines that were not transcribed correctly. Those 2 lines are below. On the 2 lines above, there should be an ampersand immediately before the equal sign (without a space in between). The operator should read ampersand equal. I hope that helps.
  11. it was just a sugestion if you want that the AutoIt installer have a restriction on .au3 file. If you just install AutoiT .au3 and .a3x file will be allowed to be executed.
  12. Controlsend

    I really dont know why you still here in this forum? You don't have intention to help anybody, you just want people know you're the superior, the man who knows everything and dont need help from anyone. Oh, obvious you're here just to tell people to go search
  13. in the case provided where the match exists, and the first match is the desired match, you have two options without UDF. The commented option is regex since you only ever need element 0, you could always end with a [0] and use the stored string without much concern for the array. The second example (and my favorite on the menu) is an appetizing stringop salad. $text = "<easyAudioPlayer>easy Audio Player what's new?</easyAudioPlayer><easyAudioPlayerUpdate>Update version 3.0.0</EasyAudioPlayerUpdate>" ;~ msgbox(0, '' , StringRegExp($text, "<easyAudioPlayer>(.*?)</easyAudioPlayer>" , 3)[0]) msgbox(0, '' , stringmid($text , StringInStr($text , '<easyAudioPlayer>') + stringlen('<easyAudioPlayer>') , StringInStr($text , '</easyAudioPlayer>') - stringlen('</easyAudioPlayer>')))
  14. @careca Got it, thanks--I"ll look into it.
  15. Is there a way to grab non-hardcoded but rather javascript generated data from a webpage? Tried a get request as well as _IEBodyReadHTML but both seem to grab the code without the javascript generated data. $oHTTP = ObjCreate("winhttp.winhttprequest.5.1") $oHTTP.Open("GET", "link", False) $oHTTP.Send() $oReceived = $oHTTP.ResponseText $oStatusCode = $oHTTP.Status Global $DataArray[10][5] If $oStatusCode <> 200 Then Exit MsgBox(1, "Error", "Status Code <> 200") EndIf FileWrite(@ScriptDir & "\output.txt", $oReceived) ; //////// #include <IE.au3> Local $FullLink = "link" Local $oIE = _IECreate($FullLink, 0, 0) _IELoadWait($oIE) Local $sText = _IEBodyReadHTML($oIE) FileWrite(@ScriptDir & "\output.txt", $sText)
  16. String Trigger

    Ok, can you try again? The focusdlg should be good now. The ip should only appear if certain conditions are met.
  17. Can't set icon to a Status Bar

    @AutoBert, sorry, but I am not following you...
  18. Bug Sound SciTe with Windows 10 x64

    (Google translator) I was doing a test with audio spam in one of my programs, maybe windows blocked the autoit to play audio by calling too much audio functions
  19. [Solved] non-block download to memory ?

    Thanks @Danyfirex. So as a solution I'll fork the download to another process ( that would download once a second ) and get the data via IPC, to free the main script from posible timeouts waiting for the data. [Solved]
  20. Bug Sound SciTe with Windows 10 x64

    _SoundPlay.au3 _WinApi_PlaySound.au3
  21. I think it is the example from the helpfile for _SoundPlay() which works fine when I run it from SciTE, so have no clue why it doesn't for you. Jos
  22. Bug Sound SciTe with Windows 10 x64

    PedroWarlock, We believe that it happens - what we want to see is the code that you use to produce the problem. M23
  23. I have a program that deals with disk directories, and occasionally I need to remove from my list those folder(s) that have no files in them. To do this, I start at the end of my TreeView and move back toward the beginning and delete any items that have no "Children" (and are not themselves files). This works fine, but it would be a bit faster and cleaner if I had a good way to get the LAST item's handle in a TreeView (as opposed to how I now do it - by looping through the total number of items and repeatedly getting the _GUICtrlTreeView_GetNext ...) Q ===> I see that there is a UDF that gets me the handle to the FIRST item in a TreeView (_GUICtrlTreeView_GetFirstItem), but I see no function to get the LAST item in a TreeView. Am I cross-eyed and just missing it??? Or is there a cleaner faster way than what I do above?? Func Check_For_And_Remove_Child_Less_Branches($h_Tree_View) $Total_Number_Of_Tree_View_Items = _GUICtrlTreeView_GetCount($h_Tree_View) $Next_Tree_View_Item_Handle = _GUICtrlTreeView_GetFirstItem($h_Tree_View) For $i = 1 to $Total_Number_Of_Tree_View_Items ; get to END of Tree View and get last items handle $Current_Tree_View_Item_Handle = $Next_Tree_View_Item_Handle $Next_Tree_View_Item_Handle = _GUICtrlTreeView_GetNext($h_Tree_View, $Current_Tree_View_Item_Handle) ; gets the next items handle in the Tree View based on the current items handle Next ; $Current_Tree_View_Item_Handle is now at the last item in the Tree View List For $i = 1 to $Total_Number_Of_Tree_View_Items ; step through all Tree View items to find non-file entries $Tree_View_Text = _GUICtrlTreeView_GetText($h_Tree_View, $Current_Tree_View_Item_Handle) ; get the Tree View List items Full Path text $Prev_Tree_View_Item_Handle = _GUICtrlTreeView_GetPrev($h_Tree_View, $Current_Tree_View_Item_Handle) ; gets the prev items handle in the Tree View based on the current items handle If NOT StringInStr($Tree_View_Text, ".") Then ; dont loop if it IS a file like a .mp4.... $Number_Of_Children = _GUICtrlTreeView_GetChildCount($h_Tree_View, $Current_Tree_View_Item_Handle) ;MsgBox("", "", " $Tree_View_Text = " & $Tree_View_Text & " $Number_Of_Children = " & $Number_Of_Children) If $Number_Of_Children < 1 Then _GUICtrlTreeView_Delete($h_Tree_View, $Current_Tree_View_Item_Handle) EndIf EndIf $Current_Tree_View_Item_Handle = $Prev_Tree_View_Item_Handle Next EndFunc
  24. Best multi-threading solution?

    I would be surprised if scanning harddrive multi threaded is quicker then single thread as I make the assumption (never tested it) your harddrive will be the limiting factor. Maybe test it with findfirstfile/findnextfile and compare for NTFS with FindFirstVolumeMountPoint/FindNextVolumeMountPoint
  25. Best multi-threading solution?

    https://www.autoitscript.com/wiki/FAQ number 39
  1. Load more activity
×