Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/14/2014 in all areas

  1. Bert

    Get Memory Adress

    I've been here going on 10 years. The number of times where I've seen memory reading or pixel search NOT being used for gaming - 1 out of a 100. You can throw up word walls with arguments all you want saying otherwise. For us old timers - experience says otherwise.
    2 points
  2. T0M50N, I can only suggest that there is a problem using that command on sound files - it does state " Digital-video and VCR devices recognize this command", and not waveforms. RazerM and I looked into providing a volume function many years ago (see >here) but as you can see decided that as it was not something we wanted to add for the same reasons as I mentioned above, even though that solution worked on sound files when tested. M23
    1 point
  3. Here some variants which came to my mind: #include <File.au3> Local $sText = "C:\folder1\folder2\img" ;variant 1 ConsoleWrite("1: " & StringRight($sText, StringLen($sText) - StringInStr($sText, "\", 0, -1)) & @CRLF) ;variant 2 ConsoleWrite("2: " & StringTrimLeft($sText, StringInStr($sText, "\", 0, -1)) & @CRLF) ;variant 3 ConsoleWrite("3: " & StringMid($sText, StringInStr($sText, "\", 0, -1) + 1) & @CRLF) ;variant 4 ConsoleWrite("4: " & StringRegExpReplace($sText, "^.*\\(.*)$", "$1") & @CRLF) ;variant 5 Local $sDrive = "", $sDir = "", $sFilename = "", $sExtension = "" Local $aPathSplit = _PathSplit($sText, $sDrive, $sDir, $sFilename, $sExtension) ConsoleWrite("5: " & $aPathSplit[3] & @CRLF) Br, UEZ
    1 point
  4. Steam is for content. This discussion should be legit.
    1 point
  5. was about to suggest this, i use something similar, that emails my phone (my carrier support free email2sms) and its like 40ish line of code .. power on the pc > run the prog > get the sms with desired text i can provide you with a working snipped here if needed (first i need to find it tho)
    1 point
  6. It seems that the WMP can't change aspect ratio, so you can't stretch to fill both: desired width and desired height. http://www.sevenforums.com/music-pictures-video/163445-stretch-videos-wmp.html http://stackoverflow.com/questions/15749181/stretch-video-of-axwindowsmediaplayer-without-maintaining-aspect-ration-in-c-sha But you can stretch to the either one of those: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <IE.au3> Global $width = 800 Global $height = 450 Global $IEControl; = null; Global $MyGUI = GUICreate("WMPlayer Control", $width,$height,(@DesktopWidth-$width)/2,(@DesktopHeight-$height)/2, $WS_OVERLAPPEDWINDOW) Global $oIE = _GUICtrl_CreateWMPlayer("about:blank", 0, 0, $width, $height) GUISetState (@SW_SHOW, $MyGUI) GUIRegisterMsg($WM_SIZE, "WM_SIZE") Global $playerOBJ = _IEGetObjById($oIE, "objWMPlayer") if NOT IsObj($playerOBJ) Then MsgBox(0, "Error", "WMP failed to be created."); Exit; EndIf ;~ $FileOpen = "C:\Users\Public\Videos\Sample Videos\Wildlife.wmv"; $FileOpen = FileOpenDialog("Open Videos", @UserProfileDir, "Movies (*.3gp;*.mp4;*.avi;*.wmv;*.flv)") If Not @error Then _wmpvalue($playerOBJ, "nocontrols") _wmploadmedia($playerOBJ,$FileOpen) $mediaName = _wmpvalue($playerOBJ, "getname"); WinSetTitle($MyGUI, "", "Playing video: " & $mediaName) Else Exit; EndIf While 1 $iMsg = GUIGetMsg() Switch $iMsg Case $GUI_EVENT_CLOSE Exit; EndSwitch WEnd Func WM_SIZE($hWnd, $iMsg, $iwParam, $ilParam) #forceref $hWnd, $iMsg, $iwParam, $ilParam Local $xClient, $yClient $xClient = BitAND($ilParam, 0x0000FFFF) $yClient = BitShift($ilParam, 16) GUICtrlSetPos($IEControl, 0, 0, $xClient, $yClient) if NOT @error Then if IsObj($playerOBJ) Then $playerOBJ.width = $xClient; if IsObj($playerOBJ) Then $playerOBJ.height = $yClient; EndIf Return $GUI_RUNDEFMSG EndFunc ;=============================================== ;=============================================== ;=============================================== #cs _wmploadmedia( $object, $URL ) $object: Object returned from the $playerOBJ = _IEGetObjById($oIE, "objWMPlayer") $URL: Path or URL of the media Return: None #ce Func _wmploadmedia( $object, $URL) $object.URL = $URL While Not $object.controls.isAvailable("play") Sleep(1) WEnd $object.controls.play() EndFunc ; Function: _GUICtrl_CreateWMPlayer ; Purpose: Embed Windows Media Player and play one file or one playlist only. ; Notes: PARAM NAME="url" is ReadOnly ; Authors: squirrely1 ; borderless IE embed example: GaryFrost ; Kudos - Kare Johansson, CFire ; References: ; http://msdn2.microsoft.com/en-us/library/ms930698.aspx ; http://www.w3schools.com/media/media_playerref.asp ; clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6 - wmplayer latest installed version ; clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95 - wmp 6.4 ;=============================================== Func _GUICtrl_CreateWMPlayer($movieURL, $playerLeft, $playerTop, $playerWidth, $playerHeight, _ $insetBorders = 0, $fullscreenMode = False, $showControls = True, $enableContextMenu = True, _ $LoopMode = false, $playCount = 1, $playVolume = 100, $playBalance = 0, $enableFullScreenControls = True) If $fullscreenMode Then $fullscreenMode = "true" Else $fullscreenMode = "false" EndIf If $showControls Then $showControls = "true" Else $showControls = "false" EndIf If $enableContextMenu Then $enableContextMenu = "true" Else $enableContextMenu = "false" EndIf If $LoopMode Then $playCount = 999 EndIf If $enableFullScreenControls Then $enableFullScreenControls = "true" Else $enableFullScreenControls = "false" EndIf Local $myIE_Obj = _IECreateEmbedded () $IEControl = GUICtrlCreateObj($myIE_Obj, $playerLeft, $playerTop, $playerWidth, $playerHeight) _IENavigate($myIE_Obj, "about:blank") Local $htmlWMP $htmlWMP = '' _ & @CR & '<body style="margin:0;padding:0" >' _ & @CR & '<OBJECT' _ & @CR & 'ID="objWMPlayer"' _ & @CR & 'STYLE="margin:0;padding:0"' _ & @CR & 'HSPACE="0"' _ & @CR & 'VSPACE="0"' _ & @CR & 'BORDER="0"' _ & @CR & 'WIDTH="' & $playerWidth & '"' _ & @CR & 'HEIGHT="' & $playerHeight & '"' _ & @CR & 'CLASSID="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6"' _ & @CR & 'STANDBY="Loading Windows Media Player components..."' _ & @CR & 'TYPE="application/x-ms-wmp">' _ & @CR & '<PARAM NAME="allowHideControls" VALUE="true">' _ & @CR & '<PARAM NAME="autoStart" VALUE="false">' _ & @CR & '<PARAM NAME="audioStream" VALUE="false">' _ & @CR & '<PARAM NAME="autoSize" VALUE="false">' _ & @CR & '<PARAM NAME="balance" VALUE="' & $playBalance & '"><!-- -100 to 100 -->' _ & @CR & '<!-- <PARAM NAME="bufferingTime" VALUE="5"><!-- seconds -->' _ & @CR & '<PARAM NAME="clickToPlay" VALUE="false"><!-- has no effect -->' _ & @CR & '<PARAM NAME="currentPosition" VALUE="0"><!-- start position within video, in seconds -->' _ & @CR & '<PARAM NAME="enableContextMenu" VALUE="' & $enableContextMenu & '">' _ & @CR & '<PARAM NAME="enableFullScreenControls" VALUE="' & $enableFullScreenControls & '">' _ & @CR & '<PARAM NAME="enabled" VALUE="true"><!-- whether controls are enabled -->' _ & @CR & '<PARAM NAME="fullScreen" VALUE="' & $fullscreenMode & '">' _ & @CR & '<PARAM NAME="mute" VALUE="false">' _ & @CR & '<PARAM NAME="playCount" VALUE="' & $playCount & '">' _ & @CR & '<!-- <PARAM NAME="previewMode" VALUE="true"> -->' _ & @CR & '<PARAM NAME="rate" VALUE="1"><!-- play speed of -.5 to 2 increments of .1 -->' _ & @CR & '<PARAM NAME="sendPlayStateChangeEvents" VALUE="false">' _ & @CR & '<PARAM NAME="showCaptioning" VALUE="false">' _ & @CR & '<PARAM NAME="showControls" VALUE="' & $showControls & '">' _ & @CR & '<PARAM NAME="showGotoBar" VALUE="false">' _ & @CR & '<PARAM NAME="showPositionControls" VALUE="true"><!-- uiMode must = "full" -->' _ & @CR & '<PARAM NAME="showStatusBar" VALUE="false"><!-- has no effect -->' _ & @CR & '<PARAM NAME="showDisplay" VALUE="true"><!-- has no effect - reportedly shows filename -->' _ & @CR & '<PARAM NAME="stretchToFit" VALUE="true">' _ & @CR & '<PARAM NAME="uiMode" VALUE="full"><!-- invisible, none, mini, full -->' _ & @CR & '<!-- <PARAM NAME="videoBorderWidth" VALUE="0"> -->' _ & @CR & '<PARAM NAME="volume" VALUE="' & $playVolume & '"><!-- volume percent setting of wmplayer.exe -->' _ & @CR & '<PARAM NAME="windowlessVideo" VALUE="false"><!-- must be the default (false) for function to work in wmp 9.0, otherwise might renders video directly in the client area -->' _ & @CR & '</OBJECT>' _ & @CR & '</body>' _IEDocWriteHTML ($myIE_Obj, $htmlWMP) _IEAction ($myIE_Obj, "refresh") $myIE_Obj.document.body.scroll = "no" $myIE_Obj.document.body.style.border = $insetBorders Return $myIE_Obj EndFunc ;==>_GUICtrl_CreateWMPlayer Func _wmpvalue( $object, $setting, $para=1 ) Switch $setting Case "play" If $object.controls.isAvailable("play") Then $object.controls.play() case "stop" If $object.controls.isAvailable("stop") Then $object.controls.stop() case "pause" If $object.controls.isAvailable("pause") Then $object.controls.pause() case "invisible" $object.uiMode = "invisible" case "controls" $object.uiMode = "full" case "nocontrols" $object.uiMode = "none" case "fullscreen" $object.fullscreen = "True" Case "step" If $object.controls.isAvailable("step") Then $object.controls.step($para) Case "fastForward" If $object.controls.isAvailable("fastForward") Then $object.controls.fastForward() Case "fastReverse" If $object.controls.isAvailable("fastReverse") Then $object.controls.fastReverse() Case "volume" $object.settings.volume = $para Case "rate" $object.settings.rate = $para Case "playcount" $object.settings.playCount = $para Case "setposition" $object.controls.currentPosition = $para Case "getposition" Return $object.controls.currentPosition Case "getpositionstring" Return $object.controls.currentPositionString Case "getduration" Return $object.currentMedia.duration Case "getname" Return $object.currentMedia.name EndSwitch EndFunc
    1 point
  7. You might have another GUI control over the button, check your GUI controls locations, also post your code
    1 point
  8. guinness

    AutoIt Snippets

    I don't mind at all, I did think about posting something similar using _GetOSLanguage (see signature) but didn't bother. Thanks for the comments, I just realised today those that post generally lack the basic information required to help them. #include <Misc.au3> ; Version: 1.00. AutoIt: V3.3.8.1 ; Retrieve the recommended information of the current system when posting a support question. Local $sSystemInfo = 'I have a valid AutoIt support question and kindly provide the details of my system:' & @CRLF & @CRLF & _ 'AutoIt Version: V' & @AutoItVersion & ' [' & _Iif(@AutoItX64, 'X64', 'X32') & ']' & @CRLF & _ 'Windows Version: ' & @OSVersion & ' [' & _GetOSLanguage() & ']' & @CRLF & _ 'Language: ' & @OSLang & @CRLF & @CRLF MsgBox(4096, 'This info has been copied to the clipboard. Use Ctrl + V to retrieve it.', $sSystemInfo) ClipPut($sSystemInfo) ; #FUNCTION# ==================================================================================================================== ; Name ..........: _GetOSLanguage ; Description ...: Retrieves the language of the OS, this supports 19 of the most popular languages. ; Syntax ........: _GetOSLanguage() ; Parameters ....: None ; Return values .: None ; Author ........: guinness ; Link ..........: http://www.autoitscript.com/forum/topic/131832-getoslanguage-retrieve-the-language-of-the-os/ ; Example .......: No ; =============================================================================================================================== Func _GetOSLanguage() Local $aString[20] = [19, "0409 0809 0c09 1009 1409 1809 1c09 2009 2409 2809 2c09 3009 3409", "0404 0804 0c04 1004 0406", "0406", "0413 0813", "0425", _ "040b", "040c 080c 0c0c 100c 140c 180c", "0407 0807 0c07 1007 1407", "040e", "0410 0810", _ "0411", "0414 0814", "0415", "0416 0816", "0418", _ "0419", "081a 0c1a", "040a 080a 0c0a 100a 140a 180a 1c0a 200a 240a 280a 2c0a 300a 340a 380a 3c0a 400a 440a 480a 4c0a 500a", "041d 081d"] Local $aLanguage[20] = [19, "English", "Chinese", "Danish", "Dutch", "Estonian", "Finnish", "French", "German", "Hungarian", "Italian", _ "Japanese", "Norwegian", "Polish", "Portuguese", "Romanian", "Russian", "Serbian", "Spanish", "Swedish"] For $i = 1 To $aString[0] If StringInStr($aString[$i], @OSLang) Then Return $aLanguage[$i] EndIf Next Return $aLanguage[1] EndFunc ;==>_GetOSLanguage
    1 point
×
×
  • Create New...