Jump to content
Sign in to follow this  
StiveMox

Red line around a window

Recommended Posts

StiveMox

Camtasia Anyone know?

When you are in recording mode, and places to select the recording area, it is a red line around a track to show where the picture will be recording.

How detect a window with a specific size and add a red line around?

Share this post


Link to post
Share on other sites
guinness

Camtasia Anyone know?

The question suggests you are offering the software :mellow:

I would start by searching the Help file for _WinAPI_WindowFromPoint() as this will get you started. Good luck.


UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Share this post


Link to post
Share on other sites
UEZ

Here an example how to mark controls:

;coded by UEZ 2011
#include <WinAPI.au3>
#include <WindowsConstants.au3>
Opt("GUIOnEventMode", 1)
Local $hGUI_Mark = GUICreate("", 0, 0, 0, 0, $WS_POPUP, $WS_EX_TOPMOST + $WS_EX_TOOLWINDOW)
GUISetBkColor(0xFF0000, $hGUI_Mark)
GUISetState()
Global Const $frame_size = 3
GUISetOnEvent(-3, "_Exit")
HotKeySet("{ESC}", "_Exit")

While Sleep(50)
    $mpos = MouseGetPos()
    $aRet = DllCall("user32.dll", "int", "WindowFromPoint", "long", $mpos[0], "long", $mpos[1])
    $aPos = WinGetPos(HWnd($aRet[0]))
    If $aRet[0] <> $hGUI_Mark And $aRet[0] <> 0  Then
        WinMove($hGUI_Mark, "", $aPos[0], $aPos[1], $aPos[2], $aPos[3])
        ToolTip("x: " &  $aPos[0] & @LF & _
                      "y: " &  $aPos[1] & @LF & _
                      "w: " &  $aPos[2] & @LF & _
                      "h: " &  $aPos[3])
        _GuiHole($hGUI_Mark, $frame_size, $frame_size, $aPos[2] - 2 * $frame_size, $aPos[3] - 2 * $frame_size, $aPos[2], $aPos[3])
        GUISetState(@SW_SHOW, $hGUI_Mark)
        WinSetOnTop($hGUI_Mark, 0, 1)
    EndIf
WEnd

Func _Exit()
    GUIDelete($hGUI_Mark)
    Exit
EndFunc

Func _GuiHole($hWnd, $i_x, $i_y, $i_sizew, $i_sizeh, $width, $height)
    Local $outer_rgn, $inner_rgn, $combined_rgn
    $outer_rgn = _WinAPI_CreateRectRgn(0, 0, $width, $height)
    $inner_rgn = _WinAPI_CreateRectRgn($i_x, $i_y, $i_x + $i_sizew, $i_y + $i_sizeh)
    $combined_rgn = _WinAPI_CreateRectRgn(0, 0, 0, 0)
    _WinAPI_CombineRgn($combined_rgn, $outer_rgn, $inner_rgn, $RGN_DIFF)
    _WinAPI_DeleteObject($outer_rgn)
    _WinAPI_DeleteObject($inner_rgn)
    _WinAPI_SetWindowRgn($hWnd, $combined_rgn)
EndFunc   ;==>_GuiHole

I don't know whether it is possible with Camtasia window - try it!

Example taken from Windows Screenshooter.

Br,

UEZ

Edited by UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites
UEZ

Use AU3Info (Ctrl+F6 in SciTE) or by Yashied!

Use the target icon to get more information about the control.

Windows Screenshooter can be found here:

Br,

UEZ

Edited by UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites
StiveMox

http://pastebin.com/hX8ymEm8

Searching the internet, I found this script created by you.

I wonder if he still has to study and gives functionality.

Someone recommended me something to study from beginner to advanced?

The Internet is a great way to learn, but when you do not know something is complicated to learn what does not know.

For example, the issues are tangled.

How do I know studying "Opt" if I do not know what it is "opt" to search the internet for study?

Is there a tutorial that teaches beginner to advanced?

Share this post


Link to post
Share on other sites
UEZ

The version on pastebin.com is old (I forgot the expire function to set it to some days)! Use the version on the link I provided above.

Try or AutoIt Wiki and of course this forum with its source of knowledge.

Br,

UEZ

Edited by UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites
StiveMox

The "Welcome to AutoIt 1-2-3" It is very practical and not theory. Where he shows an example and then immediately put some questions.

I'll take a look at the Wiki, but you have so much intelligence and ability that could launch a website tutorial level.

Still, congratulations UEZ for help.

Edited by StiveMox

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.