Jump to content

Recommended Posts

Posted

I'm using simple script on different computers(windows xp). It shows on splash screen coordinates and color under cursor. On some PCs text starting from the position which one line lower and 1-2 simbols to the right. On this PCs I need to make double height window to see a text.

This is probably not AutoIt problem. I think this is something about metrics. May be somebody can show me a direction where to dig inside windows. Which parameters SplashTextOn using from windows?

Posted

Check that you have the correct Options set in the [Optional] parameter "opt". Otherwise failing that create a GUI with $WS_POPUP as the Style!

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

Posted

I'm not using any Options sets.

#Include <Misc.au3>

If _Singleton("MouseInfo",1) = 0 Then
    Exit
EndIf

HotKeySet("{TAB}", "Get")
HotKeySet("{DOWN}", "Down")
HotKeySet("{UP}", "Up")
HotKeySet("{LEFT}", "Left")
HotKeySet("{RIGHT}", "Right")
HotKeySet("!x", "Close")

Dim $chek[5] = [0,0,0,0,0]
$mir = -20
$count = 0

Do
    $p = MouseGetPos()
    $col = PixelGetColor($p[0], $p[1])
    If $p[0] > @DesktopWidth-170 Then
        $mir = 165
    Else
        $mir = -20
    EndIf
    $chek[0] = ""& $p[0] & ", " & $p[1] & " " & $col &" "& @DesktopDepth

    SplashTextOn("", "0=" & $chek[0] &@LF&"1="& $chek[1] &@LF&"2="& $chek[2] &@LF&"3="& $chek[3] &@LF&"4="& $chek[4], _
                160, 35+15*$count, $p[0]-$mir, $p[1], 5, "Tahoma", 9)
    Sleep(250)
Until 0

;#############################################
Func Up()
    MouseMove($p[0], $p[1]-1, 1)
EndFunc
;#############################################
Func Down()
    MouseMove($p[0], $p[1]+1, 1)
EndFunc
;#############################################
Func Left()
    MouseMove($p[0]-1, $p[1], 1)
EndFunc
;#############################################
Func Right()
    MouseMove($p[0]+1, $p[1], 1)
EndFunc
;#############################################
Func Get()
    $count = $count+1
    If $count = 5 Then
        ClipPut("")
        $count = 0
        $chek[1] = 0
        $chek[2] = 0
        $chek[3] = 0
        $chek[4] = 0
        Return
    EndIf
    $chek[$count] = $chek[0]
    ClipPut($chek[1] & @CRLF & $chek[2] & @CRLF & $chek[3] & @CRLF & $chek[4] & @CRLF)
EndFunc
;#############################################
Func Close()
    ClipPut("")
    HotKeySet("{TAB}")
    HotKeySet("{DOWN}")
    HotKeySet("{UP}")
    HotKeySet("{LEFT}")
    HotKeySet("{RIGHT}")
    HotKeySet("!x")
    Exit
EndFunc
;#############################################
Posted

This is not about errors.

Simple test programm

HotKeySet("!x", "Close")
Do
    SplashTextOn("", "This is test!", 170, 35, -1, -1, 5, "Tahoma", 9)
    Sleep(250)
Until 0
;-----------------------------------
Func Close()
    HotKeySet("!x")
    Exit
EndFunc

Sorry! Can not show screenshots.

Normally it looks:
 ____________________
|This is test!       |
|                    |
|____________________|
But on some PCs :
 ____________________
|                    |
|   This is test!    |
|____________________|

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
×
×
  • Create New...