Jump to content

somdcomputerguy

Active Members
  • Posts

    2,813
  • Joined

  • Last visited

  • Days Won

    5

Community Answers

  1. somdcomputerguy's post in Subscript used in non-accessible variable Error! was marked as the answer   
    This bit of code may help. In it I use the _IsArray funtion. I do exit the script if the If is true, but you can do anything else that you want..

    $Link = _StringBetween(ClipGet(), 'u=', '') If NOT IsArray($Link) Then MsgBox(48 + 4096, '', 'No User Link!') Exit EndIf
  2. somdcomputerguy's post in How to perform shorcut key (Ctrl C + Crtl V) was marked as the answer   
    The easiest way to do this is to read the help file. You may want to use the Send() or ControlCommand() or maybe even the ClipPut() function.
  3. somdcomputerguy's post in How to trigger a system-wide hotkey? was marked as the answer   
    Try it with a lowercase r, in the Send.
  4. somdcomputerguy's post in ShellExecute(@TempDir&"\azan.mp3",@SW_HIDE) not in hide mode was marked as the answer   
    This code worked fine for me. On the computer I'm using right now, Windows Media Player is the default 'player' of MP3 files.
    ShellExecute("foghorn.mp3", "", "", "open", @SW_HIDE) Note that the path and filename of the MP3 file are different than what you are using, but that should not matter.
  5. somdcomputerguy's post in i want to make a timer here how !! was marked as the answer   
    Here is a modified version of the code you posted.

    #include <GUIConstantsEx.au3> $Form1 = GUICreate("Form1", 355, 202, 192, 124) $Input1 = GUICtrlCreateInput("Enter # of seconds to wait..", 48, 16, 225, 21) $Button1 = GUICtrlCreateButton("Button1", 80, 64, 161, 81) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 ;Here i want to pop up my msg after the duration i want how !! $t = GUICtrlRead($Input1) Sleep($t * 1000 ) MsgBox(0, $t, "This dialog popped up after " & $t & " seconds") EndSwitch WEnd
  6. somdcomputerguy's post in Search an array for duplicates? was marked as the answer   
    The _ArrayFindAll() UDF can be used to do this for you.
    edit:
    Here's an example:

    #include <Array.au3> Local $aArray[14] = [2,5,7,2,25,6,31,1,24,5,7,8,7,99] Local $aResult = _ArrayFindAll($aArray, 7) ConsoleWrite("There are " & UBound($aResult) & " 7's"& @LF)
  7. somdcomputerguy's post in Probably the simplest question out there was marked as the answer   
    MouseClick("left", $Clickt[0] + 30, $Click[1])
  8. somdcomputerguy's post in Can I Do this? (project layout) was marked as the answer   
    I believe this can be done. Here is a list of AutoIt functions that I think you would need..
    Run or ShellExecute _Ispressed MouseGetPos PixelGetColor Sleep Along with loops of course, While..WEnd, For..Next, If..EndIf.
    There is example code for each of these functions in the Help file.
    Good Luck with your project!
  9. somdcomputerguy's post in Page Source Question | Write to File Question was marked as the answer   
    http://www.autoitscript.com/autoit3/docs/libfunctions/_INetGetSource.htm
    http://www.autoitscript.com/autoit3/docs/functions/FileWrite.htm
  10. somdcomputerguy's post in Working with check-boxes and buttons. was marked as the answer   
    Do it without the Else. This is one way..

    #include <GUIConstantsEx.au3> Local $hGUI = GUICreate("FixIt GUI", 650, 650, -1, -1), _ $hButton = GUICtrlCreateButton("Download Selected", 220, 590, 270, 40), _ $hCheckbox1 = GUICtrlCreateCheckbox("ComboFix", 270, 140, 130, 30), _ $hCheckbox2 = GUICtrlCreateCheckbox("Eset", 270, 178, 130, 30) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $hButton If BitAnd(GUICtrlRead($hCheckbox1), $GUI_CHECKED) Then ConsoleWrite("Checkbox 1 is checked" & @LF) If BitAnd(GUICtrlRead($hCheckbox2), $GUI_CHECKED) Then ConsoleWrite("Checkbox 2 is checked" & @LF) EndSwitch WEndedit: the autoit tag gods are taking a break at the moment it seems, or Mr. Murphy is just doing his thing..
  11. somdcomputerguy's post in Read Html file and search for a string was marked as the answer   
    This is one way to do it. Certainly others will show you different ways to skin this cat. They all will do pretty much the same thing, just in different ways. It'll be up to you to decide which one fits with your whole script better.
    #include <String.au3> Local $file  = FileOpen("AR123.html", 0), _      $data  = FileRead($file), _       $found = _StringBetween($data, 'SR_NUMBER: ', '<br>') MsgBox(0, '', $found[0])
  12. somdcomputerguy's post in minimaze window was marked as the answer   
    See WinSetState in the Help file.
  13. somdcomputerguy's post in How to Load Webpages was marked as the answer   
    One way to do this is to read thru the IE Management section of the Help file.
  14. somdcomputerguy's post in How whould I read this one line? Website. was marked as the answer   
    I posted in a similar topic not to long ago with code that does work, but probably can be done more efficiently. Especially with some of the IE functions. But here it goes anyway..
     
    #include <INet.au3> #include <String.au3> Opt('MustDeclareVars', 1) Local $URL = "", $Needle, $Haystack, $Needle_Start, $Needle_End $Haystack = _INetGetSource($URL) $Needle_Start = '<div class="profileXpLevel"><h5>' $Needle_End = '</h5></div>' $Needle = _StringBetween($Haystack, $Needle_Start, $Needle_End) MsgBox(4096, 'Needle in a Haystack', $Needle[0]) Note to edit the $URL variable accordingly. This is the post I made before - , feel free to try it out if you care.
  15. somdcomputerguy's post in GUI Exit Problem was marked as the answer   
    This is a stripped down version of the example in the help file.
    #include <GUIConstantsEx.au3> Example1() ; example 1 Func Example1()     Local $msg     GUICreate("My GUI") ; will create a dialog box that when displayed is centered     GUISetState(@SW_SHOW) ; will display an empty dialog box     ; Run the GUI until the dialog is closed     While 1         $msg = GUIGetMsg()         If $msg = $GUI_EVENT_CLOSE Then ExitLoop     WEnd     GUIDelete() EndFunc   ;==>Example1
  16. somdcomputerguy's post in WinMove to another window's client coords? was marked as the answer   
    Use WinGetPos() to get the size of Window2.
  17. somdcomputerguy's post in Toggle pause script was marked as the answer   
    A combination of the example code in the first link, and the restart code in the second link may do it for you.
    http://www.autoitscript.com/autoit3/docs/functions/HotKeySet.htm

×
×
  • Create New...