Halloich hab noch ein Problemchen:
Ich bin auf der Suche nach einem bestimmten Style, ich bin mir aber nicht sicher ob es den gibt.
Was mich stört ist das "Weiße Feld" welches vermutlich "normal" für Vista ist.
Ich finde diese Weiße Feld nicht so toll um darauf weitere Controls zu zeichnen.
Mir wäre das Feld in "Standart-Grau" (Hintergundfarbe der Gui) lieber.
Die Reiter Sollen oben angezeigt werden.
Ich habe etwas mit den Styles rumprobiert, dises aber nicht hinbekommen.
Bei anderen Windows-Versinen gab es auch diese Reiter mit Abgeschrägten Enden.
Solch einen Styel fände ich auch interessant.
z.B. Exel, Die Saltflächen zum Auswählen der Arbeitsmappen/Tabelle1/Tabelle2/Tabelle3 (am der unteren Fensterseite)
(zumindest was die Form der Reiter betrifft)
-------------------------------------------------------------------------------
Beispile für 'Umgehung' mit grauem Laybel als Hintergrund.
Das Standart-Item Hat Grauen Hintergrund durch Labe, die anderen Hintergründe sind Weiß.
===========================================================
Spoiler anzeigen
; -- Created with ISN Form Studio 2 for ISN AutoIt Studio -- ;
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Include <GuiButton.au3>
#include <GuiTab.au3>
$PosRecord = GUICreate("PosRecord",292,699,-1,-1,-1,-1)
$tab = GUICtrlCreatetab(0,280,291,465,-1,-1)
GuiCtrlSetState(-1,2048)
GUICtrlCreateTabItem("Pixelcheck")
GUICtrlCreateTabItem("KeyListe")
GUICtrlCreateTabItem("HELP")
GUICtrlCreateTabItem("")
_GUICtrlTab_SetCurFocus($tab,-1)
GUISwitch($PosRecord,_GUICtrlTab_SetCurFocus($tab,0)&GUICtrlRead ($tab, 1))
GUICtrlCreateLabel("",0,300,292,443,-1,131072)
GUICtrlSetState(-1,128)
GUICtrlSetBkColor(-1,"0xEFEFEF")
GUICtrlCreateTabItem("")
GUISwitch($PosRecord,_GUICtrlTab_SetCurFocus($tab,0)&GUICtrlRead ($tab, 1))
$DrawRectButten_h = GUICtrlCreateButton("DrawFrame",220,363,60,25,-1,-1)
GUICtrlSetOnEvent(-1,"DrawFrameButten")
$X2posAbsolutInput_h = GUICtrlCreateInput("150",248,623,32,20,-1,512)
GUICtrlSetOnEvent(-1,"ChangeLogger")
$X2posRelWindowInput_h = GUICtrlCreateInput("150",208,536,32,20,-1,512)
GUICtrlSetOnEvent(-1,"ChangeLogger")
$Y2posRelWindowInput_h = GUICtrlCreateInput("100",128,558,32,20,-1,512)
GUICtrlSetOnEvent(-1,"ChangeLogger")
$Y2posAbsolutInput_h = GUICtrlCreateInput("100",173,647,32,20,-1,512)
GUICtrlSetOnEvent(-1,"ChangeLogger")
$YposRelWindowInput_h = GUICtrlCreateInput("50",128,515,32,20,-1,512)
GUICtrlSetOnEvent(-1,"ChangeLogger")
$YposAbsolutInput_h = GUICtrlCreateInput("50",172,600,32,20,-1,512)
GUICtrlSetOnEvent(-1,"ChangeLogger")
GUICtrlSetBkColor(-1,"0xFFfffff")
$XposAbsolutInput_h = GUICtrlCreateInput("100",108,623,32,20,-1,512)
GUICtrlSetOnEvent(-1,"ChangeLogger")
$XposRelWindowInput_h = GUICtrlCreateInput("100",62,536,32,20,-1,512)
GUICtrlSetOnEvent(-1,"ChangeLogger")
$YposRelClientInput_h = GUICtrlCreateInput("27",128,428,32,20,-1,512)
GUICtrlSetOnEvent(-1,"ChangeLogger")
$XposRelClientInput_h = GUICtrlCreateInput("97",62,450,32,20,-1,512)
GUICtrlSetOnEvent(-1,"ChangeLogger")
GUICtrlCreateTabItem("")
$IniWrite_h = GUICtrlCreateButton("IniWrite",4,115,52,25,-1,-1)
GUICtrlSetOnEvent(-1,"IniWriteButten")
GUISwitch($PosRecord,_GUICtrlTab_SetCurFocus($tab,0)&GUICtrlRead ($tab, 1))
$X2posRelClientInput_h = GUICtrlCreateInput("150",197,451,32,20,-1,512)
GUICtrlSetOnEvent(-1,"ChangeLogger")
$Y2posRelClientInput_h = GUICtrlCreateInput("77",128,474,32,20,-1,512)
GUICtrlSetOnEvent(-1,"ChangeLogger")
GUISwitch($PosRecord,_GUICtrlTab_SetCurFocus($tab,2)&GUICtrlRead ($tab, 1))
GUICtrlCreateLabel("Alt+y: 1. Reihe Felder",43,596,167,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
GUICtrlCreateLabel("Alt+c: 2. Reihe Felder",41,612,196,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
GUISwitch($PosRecord,_GUICtrlTab_SetCurFocus($tab,0)&GUICtrlRead ($tab, 1))
$ClearRect_h = GUICtrlCreateButton("ClearRect",220,391,60,25,-1,-1)
GUICtrlSetOnEvent(-1,"ClearRectButten")
$PixelCheck_h = GUICtrlCreateButton("PixelCheck",220,335,60,25,-1,-1)
GUICtrlSetOnEvent(-1,"HK_Pixelcheck")
$WindowName_h = GUICtrlCreateLabel("WindowName",26,333,76,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
$WindowPosX_h = GUICtrlCreateLabel("WindowPosX",26,352,30,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
GUICtrlCreateGroup("FENSTER",16,315,91,88,-1,-1)
GUICtrlSetBkColor(-1,"0xF0F0F0")
$WindowPosY_h = GUICtrlCreateLabel("WindowPosY",66,352,30,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
GUISwitch($PosRecord,_GUICtrlTab_SetCurFocus($tab,2)&GUICtrlRead ($tab, 1))
GUICtrlCreateLabel("Alt+b: Fenster Aussuchen",41,628,139,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
GUICtrlCreateTabItem("")
$WindowRefChkBox_h = GUICtrlCreateCheckbox("PixelCheckPositionen verwenden",12,224,176,20,-1,-1)
GUICtrlSetOnEvent(-1,"RefCheck")
GUICtrlCreatelist("",20,0,203,110,-1,512)
GUISwitch($PosRecord,_GUICtrlTab_SetCurFocus($tab,0)&GUICtrlRead ($tab, 1))
$CALC_h = GUICtrlCreateButton("CALC",220,307,60,25,-1,-1)
GUICtrlSetOnEvent(-1,"HK_CALC")
$WindowBreite_h = GUICtrlCreateLabel("WindowBreite",26,367,30,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
$WindowHeigh_h = GUICtrlCreateLabel("WindowHeigh",66,367,30,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
GUICtrlCreateTabItem("")
$IniRead_h = GUICtrlCreateButton("IniRead",60,116,56,25,-1,-1)
GUICtrlSetOnEvent(-1,"HK_IniRead")
GUISwitch($PosRecord,_GUICtrlTab_SetCurFocus($tab,0)&GUICtrlRead ($tab, 1))
GUICtrlCreateLabel("PixelCheckSum =",116,327,84,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
$PixelCheckSum_h = GUICtrlCreateLabel("PixelCheckSum",116,343,79,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
GUICtrlCreateTabItem("")
$IniNameInput_h = GUICtrlCreateInput("IniName",144,144,99,20,-1,512)
$WindowSiseNameChkbox_h = GUICtrlCreateCheckbox("=WinSise",76,144,66,21,-1,-1)
GUICtrlSetOnEvent(-1,"WindowSiseNameChkbox")
GUICtrlSetTip(-1,"WindowSise")
$IniPathInput_h = GUICtrlCreateInput("root/dings/bums/dings",68,170,196,20,-1,512)
$SectionNameInput_h = GUICtrlCreateInput("SectionName",101,203,123,20,-1,512)
GUICtrlSetOnEvent(-1,"SectionNameInputButten")
$KeyNameInput_h = GUICtrlCreateInput("KeyName",104,244,123,20,-1,512)
$KeyNameCheckBox_h = GUICtrlCreateCheckbox("KeyName =",12,244,81,20,-1,-1)
$SectionNameChkBox_h = GUICtrlCreateCheckbox("SectionName =",12,204,93,20,-1,-1)
GUICtrlSetOnEvent(-1,"SectionNameCheckButten")
GUISwitch($PosRecord,_GUICtrlTab_SetCurFocus($tab,0)&GUICtrlRead ($tab, 1))
$CordelMouseModeLabel_h = GUICtrlCreateLabel("CordelMouseMode",116,311,91,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
$WinClientSizeXLabel_h = GUICtrlCreateLabel("WinClientSizeX",26,380,30,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
$WinClientSizeYLabel_h = GUICtrlCreateLabel("WinClientSizeY",66,380,30,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
$X2posRelWindowSolutionLabel_h = GUICtrlCreateLabel("' = 0000",240,536,38,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
$Y2posRelWindowSolutionLabel_h = GUICtrlCreateLabel("' = 0000",160,562,50,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
$YposRelWindowSolutionLabel_h = GUICtrlCreateLabel("' = 0000",160,515,50,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
$XposRelWindowSolutionLabel_h = GUICtrlCreateLabel("' = 0000",96,539,50,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
$XposRelClientLabel_h = GUICtrlCreateLabel("0000 + '",19,453,42,15,2,-1)
GUICtrlSetBkColor(-1,"-2")
$Y2posRelClientLabel_h = GUICtrlCreateLabel("0000 + '",85,477,42,15,2,-1)
GUICtrlSetBkColor(-1,"-2")
$YposRelClientSolutionLabel_h = GUICtrlCreateLabel("' = 0000",160,428,50,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
$X2posRelClientLabel_h = GUICtrlCreateLabel("0000 + '",157,454,42,15,2,-1)
GUICtrlSetBkColor(-1,"-2")
GUICtrlCreateTabItem("")
GUICtrlCreateLabel("' = 0000",-275,310,50,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
GUISwitch($PosRecord,_GUICtrlTab_SetCurFocus($tab,0)&GUICtrlRead ($tab, 1))
$XposRelWindowLabel_h = GUICtrlCreateLabel("0000 + '",19,539,42,15,2,-1)
GUICtrlSetBkColor(-1,"-2")
$YposRelWindowLabel_h = GUICtrlCreateLabel("0000 + '",84,516,42,15,2,-1)
GUICtrlSetBkColor(-1,"-2")
$Y2posRelClientSolutionLabel_h = GUICtrlCreateLabel("' = 0000",160,477,50,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
$X2posRelWindowLabel_h = GUICtrlCreateLabel("0000 + '",165,539,42,15,2,-1)
GUICtrlSetBkColor(-1,"-2")
$XposRelClientSolutionLabel_h = GUICtrlCreateLabel("' = 0000",96,453,50,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
$X2posRelClientSolutionLabel_h = GUICtrlCreateLabel("' = 0000",232,454,50,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
$Y2posRelWindowLabel_h = GUICtrlCreateLabel("0000 + '",85,563,42,15,2,-1)
GUICtrlSetBkColor(-1,"-2")
$YposRelClientLabel_h = GUICtrlCreateLabel("0000 + '",85,429,42,15,2,-1)
GUICtrlSetBkColor(-1,"-2")
GUICtrlCreateGroup("RelativClient",12,415,271,83,-1,-1)
GUICtrlSetColor(-1,"0xFF0000")
GUICtrlSetBkColor(-1,"0xF0F0F0")
GUICtrlCreateGroup("RelativWindow",12,499,271,83,-1,-1)
GUICtrlSetBkColor(-1,"0xF0F0F0")
GUICtrlCreateGroup("AbsolutDesc",12,583,271,86,-1,-1)
GUICtrlSetBkColor(-1,"0xF0F0F0")
$AbsolutRadio_h = GUICtrlCreateRadio("0",21,597,14,20,-1,-1)
GUICtrlSetOnEvent(-1,"RefCheck")
$RelClientRadio_h = GUICtrlCreateRadio("0",20,429,14,20,-1,-1)
GUICtrlSetOnEvent(-1,"RefCheck")
$RelWindowRadio_h = GUICtrlCreateRadio("0",20,512,14,20,-1,-1)
GUICtrlSetOnEvent(-1,"RefCheck")
$KeyNameY2pos_h = GUICtrlCreateInput("Y2",80,647,85,20,2,512)
GUICtrlSetOnEvent(-1,"KeyNamePCSPos")
GUICtrlSetTip(-1,"Ini-Schlüssel-Name")
$KeyNameXpos_h = GUICtrlCreateInput("X",36,623,64,20,2,512)
GUICtrlSetOnEvent(-1,"KeyNamePCSPos")
GUICtrlSetTip(-1,"Ini-Schlüssel-Name")
$KeyNameYpos_h = GUICtrlCreateInput("Y",80,599,85,20,2,512)
GUICtrlSetOnEvent(-1,"KeyNamePCSPos")
GUICtrlSetTip(-1,"Ini-Schlüssel-Name")
$KeyNameX2pos_h = GUICtrlCreateInput("X2",160,623,81,20,2,512)
GUICtrlSetOnEvent(-1,"KeyNamePCSPos")
GUICtrlSetTip(-1,"Ini-Schlüssel-Name")
$KeyNameChkBox_h = GUICtrlCreateCheckbox("KeyName OK",204,671,81,20,-1,-1)
GUICtrlSetOnEvent(-1,"KeyNameChkBox")
GUICtrlCreateTabItem("")
GUICtrlCreateButton("CreateArray",118,116,74,25,-1,-1)
GUICtrlSetOnEvent(-1,"CreateArray")
GUICtrlCreateButton("DisplayArray",196,116,72,25,-1,-1)
GUICtrlSetOnEvent(-1,"DisplayArray")
GUISwitch($PosRecord,_GUICtrlTab_SetCurFocus($tab,0)&GUICtrlRead ($tab, 1))
GUICtrlCreateLabel(":",104,627,2,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
GUICtrlCreateLabel(":",244,627,2,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
GUICtrlCreateLabel(":",168,603,2,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
GUICtrlCreateLabel(":",168,651,2,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
GUICtrlCreateTabItem("")
GUICtrlCreateLabel(".ini",244,148,50,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
$IniPathCheckBox_h = GUICtrlCreateCheckbox("IniPath:",12,170,52,20,-1,-1)
$IniNameCheckBox_h = GUICtrlCreateCheckbox("IniName:",12,146,63,20,-1,-1)
_GUICtrlTab_SetCurFocus($tab,0)
GUISetState(@SW_SHOW,$PosRecord)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
----------------------------------------------------------------------------------------
Beispiel für ein änlichen Styel, aber mit den Reitern auf der Falschen Seite.
Die Reiter (TabItems) sollen Oben sein.
======================================================================
Spoiler anzeigen
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Include <GuiButton.au3>
#include <GuiTab.au3>
$PosRecord = GUICreate("PosRecord",292,700,-1,-1,-1,-1)
;######################################
$tab = GUICtrlCreatetab(0,280,294,421,0x54000280,0x00000080)
;######################################
GuiCtrlSetState(-1,2048)
GUICtrlCreateTabItem("Pixelcheck")
GUICtrlCreateTabItem("KeyListe")
GUICtrlCreateTabItem("HELP")
;GUICtrlSetStyle($tab, 0x54000280 )
GUICtrlCreateTabItem("")
_GUICtrlTab_SetCurFocus($tab,-1)
GUISwitch($PosRecord,_GUICtrlTab_SetCurFocus($tab,0)&GUICtrlRead ($tab, 1))
$DrawRectButten_h = GUICtrlCreateButton("DrawFrame",220,363,60,25,-1,-1)
GUICtrlSetOnEvent(-1,"DrawFrameButten")
GUICtrlCreateTabItem("")
GUISwitch($PosRecord,_GUICtrlTab_SetCurFocus($tab,0)&GUICtrlRead ($tab, 1))
$X2posAbsolutInput_h = GUICtrlCreateInput("150",248,623,32,20,-1,512)
GUICtrlSetOnEvent(-1,"ChangeLogger")
$X2posRelWindowInput_h = GUICtrlCreateInput("150",208,536,32,20,-1,512)
GUICtrlSetOnEvent(-1,"ChangeLogger")
$Y2posRelWindowInput_h = GUICtrlCreateInput("100",128,558,32,20,-1,512)
GUICtrlSetOnEvent(-1,"ChangeLogger")
$Y2posAbsolutInput_h = GUICtrlCreateInput("100",173,647,32,20,-1,512)
GUICtrlSetOnEvent(-1,"ChangeLogger")
$YposRelWindowInput_h = GUICtrlCreateInput("50",128,515,32,20,-1,512)
GUICtrlSetOnEvent(-1,"ChangeLogger")
$YposAbsolutInput_h = GUICtrlCreateInput("50",172,600,32,20,-1,512)
GUICtrlSetOnEvent(-1,"ChangeLogger")
GUICtrlSetBkColor(-1,"0xFFfffff")
$XposAbsolutInput_h = GUICtrlCreateInput("100",108,623,32,20,-1,512)
GUICtrlSetOnEvent(-1,"ChangeLogger")
$XposRelWindowInput_h = GUICtrlCreateInput("100",62,536,32,20,-1,512)
GUICtrlSetOnEvent(-1,"ChangeLogger")
$YposRelClientInput_h = GUICtrlCreateInput("27",128,428,32,20,-1,512)
GUICtrlSetOnEvent(-1,"ChangeLogger")
$XposRelClientInput_h = GUICtrlCreateInput("97",62,450,32,20,-1,512)
GUICtrlSetOnEvent(-1,"ChangeLogger")
GUICtrlCreateTabItem("")
$IniWrite_h = GUICtrlCreateButton("IniWrite",4,115,52,25,-1,-1)
GUICtrlSetOnEvent(-1,"IniWriteButten")
GUISwitch($PosRecord,_GUICtrlTab_SetCurFocus($tab,0)&GUICtrlRead ($tab, 1))
$X2posRelClientInput_h = GUICtrlCreateInput("150",197,451,32,20,-1,512)
GUICtrlSetOnEvent(-1,"ChangeLogger")
$Y2posRelClientInput_h = GUICtrlCreateInput("77",128,474,32,20,-1,512)
GUICtrlSetOnEvent(-1,"ChangeLogger")
GUISwitch($PosRecord,_GUICtrlTab_SetCurFocus($tab,2)&GUICtrlRead ($tab, 1))
GUICtrlCreateLabel("Alt+y: 1. Reihe Felder",43,671,167,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
GUICtrlCreateLabel("Alt+c: 2. Reihe Felder",41,687,196,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
GUISwitch($PosRecord,_GUICtrlTab_SetCurFocus($tab,0)&GUICtrlRead ($tab, 1))
$ClearRect_h = GUICtrlCreateButton("ClearRect",220,391,60,25,-1,-1)
GUICtrlSetOnEvent(-1,"ClearRectButten")
$PixelCheck_h = GUICtrlCreateButton("PixelCheck",220,335,60,25,-1,-1)
GUICtrlSetOnEvent(-1,"HK_Pixelcheck")
$WindowName_h = GUICtrlCreateLabel("WindowName",26,333,76,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
$WindowPosX_h = GUICtrlCreateLabel("WindowPosX",26,352,30,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
GUICtrlCreateGroup("FENSTER",16,315,91,88,-1,-1)
GUICtrlSetBkColor(-1,"0xF0F0F0")
$WindowPosY_h = GUICtrlCreateLabel("WindowPosY",66,352,30,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
GUISwitch($PosRecord,_GUICtrlTab_SetCurFocus($tab,2)&GUICtrlRead ($tab, 1))
GUICtrlCreateLabel("Alt+b: Fenster Aussuchen",41,703,139,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
GUICtrlCreateTabItem("")
$WindowRefChkBox_h = GUICtrlCreateCheckbox("PixelCheckPositionen verwenden",12,224,176,20,-1,-1)
GUICtrlSetOnEvent(-1,"RefCheck")
GUICtrlCreatelist("",20,0,203,110,-1,512)
GUISwitch($PosRecord,_GUICtrlTab_SetCurFocus($tab,0)&GUICtrlRead ($tab, 1))
$CALC_h = GUICtrlCreateButton("CALC",220,307,60,25,-1,-1)
GUICtrlSetOnEvent(-1,"HK_CALC")
$WindowBreite_h = GUICtrlCreateLabel("WindowBreite",26,367,30,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
$WindowHeigh_h = GUICtrlCreateLabel("WindowHeigh",66,367,30,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
GUICtrlCreateTabItem("")
$IniRead_h = GUICtrlCreateButton("IniRead",60,116,56,25,-1,-1)
GUICtrlSetOnEvent(-1,"HK_IniRead")
GUISwitch($PosRecord,_GUICtrlTab_SetCurFocus($tab,0)&GUICtrlRead ($tab, 1))
GUICtrlCreateLabel("PixelCheckSum =",116,327,84,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
$PixelCheckSum_h = GUICtrlCreateLabel("PixelCheckSum",116,343,79,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
GUICtrlCreateTabItem("")
$IniNameInput_h = GUICtrlCreateInput("IniName",144,144,99,20,-1,512)
$WindowSiseNameChkbox_h = GUICtrlCreateCheckbox("=WinSise",76,144,66,21,-1,-1)
GUICtrlSetOnEvent(-1,"WindowSiseNameChkbox")
GUICtrlSetTip(-1,"WindowSise")
$IniPathInput_h = GUICtrlCreateInput("root/dings/bums/dings",68,170,196,20,-1,512)
$SectionNameInput_h = GUICtrlCreateInput("SectionName",101,203,123,20,-1,512)
GUICtrlSetOnEvent(-1,"SectionNameInputButten")
$KeyNameInput_h = GUICtrlCreateInput("KeyName",104,244,123,20,-1,512)
$KeyNameCheckBox_h = GUICtrlCreateCheckbox("KeyName =",12,244,81,20,-1,-1)
$SectionNameChkBox_h = GUICtrlCreateCheckbox("SectionName =",12,204,93,20,-1,-1)
GUICtrlSetOnEvent(-1,"SectionNameCheckButten")
GUISwitch($PosRecord,_GUICtrlTab_SetCurFocus($tab,0)&GUICtrlRead ($tab, 1))
$CordelMouseModeLabel_h = GUICtrlCreateLabel("CordelMouseMode",116,311,91,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
$WinClientSizeXLabel_h = GUICtrlCreateLabel("WinClientSizeX",26,380,30,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
$WinClientSizeYLabel_h = GUICtrlCreateLabel("WinClientSizeY",66,380,30,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
$X2posRelWindowSolutionLabel_h = GUICtrlCreateLabel("' = 0000",240,536,38,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
$Y2posRelWindowSolutionLabel_h = GUICtrlCreateLabel("' = 0000",160,562,50,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
$YposRelWindowSolutionLabel_h = GUICtrlCreateLabel("' = 0000",160,515,50,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
$XposRelWindowSolutionLabel_h = GUICtrlCreateLabel("' = 0000",96,539,50,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
$XposRelClientLabel_h = GUICtrlCreateLabel("0000 + '",19,453,42,15,2,-1)
GUICtrlSetBkColor(-1,"-2")
$Y2posRelClientLabel_h = GUICtrlCreateLabel("0000 + '",85,477,42,15,2,-1)
GUICtrlSetBkColor(-1,"-2")
$YposRelClientSolutionLabel_h = GUICtrlCreateLabel("' = 0000",160,428,50,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
$X2posRelClientLabel_h = GUICtrlCreateLabel("0000 + '",157,454,42,15,2,-1)
GUICtrlSetBkColor(-1,"-2")
GUICtrlCreateTabItem("")
GUICtrlCreateLabel("' = 0000",-275,310,50,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
GUISwitch($PosRecord,_GUICtrlTab_SetCurFocus($tab,0)&GUICtrlRead ($tab, 1))
$XposRelWindowLabel_h = GUICtrlCreateLabel("0000 + '",19,539,42,15,2,-1)
GUICtrlSetBkColor(-1,"-2")
$YposRelWindowLabel_h = GUICtrlCreateLabel("0000 + '",84,516,42,15,2,-1)
GUICtrlSetBkColor(-1,"-2")
$Y2posRelClientSolutionLabel_h = GUICtrlCreateLabel("' = 0000",160,477,50,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
$X2posRelWindowLabel_h = GUICtrlCreateLabel("0000 + '",165,539,42,15,2,-1)
GUICtrlSetBkColor(-1,"-2")
$XposRelClientSolutionLabel_h = GUICtrlCreateLabel("' = 0000",96,453,50,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
$X2posRelClientSolutionLabel_h = GUICtrlCreateLabel("' = 0000",232,454,50,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
$Y2posRelWindowLabel_h = GUICtrlCreateLabel("0000 + '",85,563,42,15,2,-1)
GUICtrlSetBkColor(-1,"-2")
$YposRelClientLabel_h = GUICtrlCreateLabel("0000 + '",85,429,42,15,2,-1)
GUICtrlSetBkColor(-1,"-2")
GUICtrlCreateGroup("RelativClient",12,415,271,83,-1,-1)
GUICtrlSetColor(-1,"0xFF0000")
GUICtrlSetBkColor(-1,"0xF0F0F0")
GUICtrlCreateGroup("RelativWindow",12,499,271,83,-1,-1)
GUICtrlSetBkColor(-1,"0xF0F0F0")
GUICtrlCreateGroup("AbsolutDesc",12,583,271,86,-1,-1)
GUICtrlSetBkColor(-1,"0xF0F0F0")
$AbsolutRadio_h = GUICtrlCreateRadio("0",21,597,14,20,-1,-1)
GUICtrlSetOnEvent(-1,"RefCheck")
$RelClientRadio_h = GUICtrlCreateRadio("0",20,429,14,20,-1,-1)
GUICtrlSetOnEvent(-1,"RefCheck")
$RelWindowRadio_h = GUICtrlCreateRadio("0",20,512,14,20,-1,-1)
GUICtrlSetOnEvent(-1,"RefCheck")
$KeyNameY2pos_h = GUICtrlCreateInput("Y2",80,647,85,20,2,512)
GUICtrlSetOnEvent(-1,"KeyNamePCSPos")
GUICtrlSetTip(-1,"Ini-Schlüssel-Name")
$KeyNameXpos_h = GUICtrlCreateInput("X",36,623,64,20,2,512)
GUICtrlSetOnEvent(-1,"KeyNamePCSPos")
GUICtrlSetTip(-1,"Ini-Schlüssel-Name")
$KeyNameYpos_h = GUICtrlCreateInput("Y",80,599,85,20,2,512)
GUICtrlSetOnEvent(-1,"KeyNamePCSPos")
GUICtrlSetTip(-1,"Ini-Schlüssel-Name")
$KeyNameX2pos_h = GUICtrlCreateInput("X2",160,623,81,20,2,512)
GUICtrlSetOnEvent(-1,"KeyNamePCSPos")
GUICtrlSetTip(-1,"Ini-Schlüssel-Name")
$KeyNameChkBox_h = GUICtrlCreateCheckbox("KeyName OK",204,671,81,20,-1,-1)
GUICtrlSetOnEvent(-1,"KeyNameChkBox")
GUICtrlCreateTabItem("")
GUICtrlCreateButton("CreateArray",118,116,74,25,-1,-1)
GUICtrlSetOnEvent(-1,"CreateArray")
GUICtrlCreateButton("DisplayArray",196,116,72,25,-1,-1)
GUICtrlSetOnEvent(-1,"DisplayArray")
GUISwitch($PosRecord,_GUICtrlTab_SetCurFocus($tab,0)&GUICtrlRead ($tab, 1))
GUICtrlCreateLabel(":",104,627,2,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
GUICtrlCreateLabel(":",244,627,2,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
GUICtrlCreateLabel(":",168,603,2,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
GUICtrlCreateLabel(":",168,651,2,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
GUICtrlCreateTabItem("")
GUICtrlCreateLabel(".ini",244,148,50,15,-1,-1)
GUICtrlSetBkColor(-1,"-2")
$IniPathCheckBox_h = GUICtrlCreateCheckbox("IniPath:",12,170,52,20,-1,-1)
$IniNameCheckBox_h = GUICtrlCreateCheckbox("IniName:",12,146,63,20,-1,-1)
;PosRecord.au3
[/autoit] [autoit][/autoit] [autoit]#include <GuiTab.au3>
#include <Array.au3>
;#include <PosRecord.isf>
#include <GUIConstantsEx.au3>
#include "D:\Dokumente\ISN AutoIt Studio\Projects\w101Auto\DrawRectFunc.au3"
#include <GDIPlus.au3>
AutoItSetOption("GUIOnEventMode", 1)
Local $PosRecord, $Xpos_h, $Ypos_h, $X2pos_h, $Y2pos_h, $rectIsDrawn = 0
Global $WindowPos, $WinHandel_REF, $Change, $left, $top, $right, $bottom, $IniPathInput_h
Global $WindowName_REF, $RefCheck, $DrawRectButte_h, $AbsolutClientPos_0_X, $AbsolutClientPos_0_Y
Global $XposRelClientLabel_h, $X2posRelClientLabel_h, $YposRelClientLabel_h, $Y2posRelClientLabel_h
Global $DrawRect = 0, $hFrame, $ObjecktNameChkBox_h, $IniPathCheckBox_h, $IniNameCheckBox_h, $IniNameInput_h
Global $SectionInput_h, $KeyNameInput_h
;^ Ctrl // ! Alt // + Shift // # Win
HotKeySet("!y", "HK_MouseGetPos")
HotKeySet("!c", "HK_MouseGetPos2")
HotKeySet("!b", "HK_WindowAnalyse")
GUISetOnEvent($GUI_EVENT_CLOSE, "SpecialEvents")
GUISetOnEvent($GUI_EVENT_MINIMIZE, "SpecialEvents")
GUISetOnEvent($GUI_EVENT_RESTORE, "SpecialEvents")
AutoItSetOption("MouseCoordMode", 1) ;Absolute Bildschirm Coordinaten#
GUICtrlSetData($CordelMouseModeLabel_h, "MouseCoordMode 1")
WinMove($PosRecord, "", 1086, 4)
GUICtrlSetState($CALC_h, $GUI_DISABLE)
GUICtrlSetState($ClearRect_h, $GUI_DISABLE)
GUICtrlSetData($IniPathInput_h, @ScriptDir, "")
GUICtrlSetState($AbsolutRadio_h, $GUI_ENABLE + $GUI_CHECKED)
GUICtrlSetState($SectionNameChkBox_h, $GUI_DISABLE + $GUI_UNCHECKED)
GUISetState(@SW_SHOW)
WinSetOnTop($PosRecord, "", 1)
WindowAnalyse()
HK_CALC()
Func HK_Pixelcheck()
$PosRefArray = HK_CALC()
If $rectIsDrawn = 1 And Not $Change = 0 Then GetPosAndDrawFrame($PosRefArray)
If IsArray($PosRefArray) Then
GUICtrlSetData($PixelCheckSum_h, PixelChecksum($PosRefArray[2], $PosRefArray[3], $PosRefArray[4], $PosRefArray[5]))
EndIf
EndFunc ;==>HK_Pixelcheck
Func HK_WindowAnalyse()
[/autoit] [autoit][/autoit] [autoit]Global $WinHandel_REF = WinGetHandle("[active]")
WindowAnalyse()
RefCheck()
EndFunc ;==>HK_WindowAnalyse
Func Test()
EndFunc ;==>Test
;Func WindowAnalyse()
Func WindowAnalyse()
If Not $WinHandel_REF Or $WinHandel_REF = 0 Then
GUICtrlSetState($WindowSiseNameChkbox_h, $GUI_DISABLE + $GUI_UNCHECKED)
Return 0
EndIf
Global $WindowName_REF = WinGetTitle($WinHandel_REF)
GUICtrlSetState($WindowSiseNameChkbox_h, $GUI_ENABLE)
If $WindowName_REF = "RahmenGui" Then
Beep(500)
GUICtrlSetColor($WindowName_h, 0xFF0000)
GUICtrlSetFont($WindowName_h, 11)
GUICtrlSetData($WindowName_h, $WindowName_REF)
ConsoleWrite(' (' & @ScriptLineNumber & ' )' & $WindowName_REF & @CRLF)
Else
GUICtrlSetColor($WindowName_h, 0x329632) ;Dunkelgrün
GUICtrlSetFont($WindowName_h, 10)
GUICtrlSetData($WindowName_h, $WindowName_REF)
If Not $WindowName_REF = 0 Then GUICtrlSetState($CALC_h, $GUI_ENABLE)
;WindowPositionen
Global $WindowPos = WinGetPos($WinHandel_REF) ;Ermittelt die Position und die Größe eines Fensters.
Global $WindowClientSize_REF = WinGetClientSize($WinHandel_REF) ;$array[0] = Breite des Fensters. $array[1] = Höhe des Fensters.
GUICtrlSetData($WindowPosX_h, $WindowPos[0]) ;[0] = x-Position
GUICtrlSetData($WindowPosY_h, $WindowPos[1]) ;[1] = Y-Position
GUICtrlSetData($WindowBreite_h, $WindowPos[2]) ;[2] = Breite
GUICtrlSetData($WindowHeigh_h, $WindowPos[3]) ;[3] = Höhe
GUICtrlSetData($WinClientSizeXLabel_h, $WindowClientSize_REF[0]) ;[0] = Breite des Anwendungsbereichs
GUICtrlSetData($WinClientSizeYLabel_h, $WindowClientSize_REF[1]) ;[1] = Höhe des Anwendungsbereichs
Global $AbsolutClientPos_0_X = GetAbsolutClientPos_0_X($WinHandel_REF)
Global $AbsolutClientPos_0_Y = GetAbsolutClientPos_0_Y($WinHandel_REF)
ConsoleWrite('(' & @ScriptLineNumber & ') ' & $AbsolutClientPos_0_X & ', ' & $AbsolutClientPos_0_Y & @CRLF)
GUICtrlSetData($XposRelClientLabel_h, $AbsolutClientPos_0_X & ' + ')
GUICtrlSetData($X2posRelClientLabel_h, $AbsolutClientPos_0_X & ' + ')
GUICtrlSetData($YposRelClientLabel_h, $AbsolutClientPos_0_Y & ' + ')
GUICtrlSetData($Y2posRelClientLabel_h, $AbsolutClientPos_0_Y & ' + ')
GUICtrlSetData($XposRelWindowLabel_h, $WindowPos[0] & ' + ') ;[0] = x-Position
GUICtrlSetData($X2posRelWindowLabel_h, $WindowPos[0] & ' + ') ;[0] = x-Position
GUICtrlSetData($YposRelWindowLabel_h, $WindowPos[1] & ' + ') ;[1] = x-Position
GUICtrlSetData($Y2posRelWindowLabel_h, $WindowPos[1] & ' + ') ;[1] = x-Position
EndIf
Return 1
EndFunc ;==>WindowAnalyse
Func RefCheck();Prüft Radio
Global $RefCheck = GUICtrlRead($WindowRefChkBox_h); 1 = True and 4 = False
Local $Radio = 'RadioAbsolut'
If BitAND(GUICtrlRead($AbsolutRadio_h), $GUI_CHECKED) = $GUI_CHECKED Then
Local $Radio = 'RadioAbsolut'
ElseIf BitAND(GUICtrlRead($RelWindowRadio_h), $GUI_CHECKED) = $GUI_CHECKED Then
Local $Radio = 'RadioRelWindow'
ElseIf BitAND(GUICtrlRead($RelClientRadio_h), $GUI_CHECKED) = $GUI_CHECKED Then
Local $Radio = 'RadioRelClient'
EndIf
;ConsoleWrite($Radio & ' (' & @ScriptLineNumber & ' )' & $WindowName_REF & @CRLF)
;0 = relative Koordinaten zum aktiven Fenster
;1 = absolute Bildschirm Koordinaten (Standard)
;2 = relative Koordinaten zum Anwendungsbereich des aktiven Fensters
;Wenn Fenster RahmenGui Ausgwählt ist :
If $WindowName_REF = "RahmenGui" Then
ConsoleWrite($Radio & ' (' & @ScriptLineNumber & ' )' & $WindowName_REF & @CRLF)
GUICtrlSetData($CordelMouseModeLabel_h, $Radio)
GUICtrlSetState($DrawRectButten_h, $GUI_DISABLE)
; RadioButton
GUICtrlSetState($AbsolutRadio_h, $GUI_ENABLE + $GUI_CHECKED)
GUICtrlSetState($RelWindowRadio_h, $GUI_DISABLE)
GUICtrlSetState($RelClientRadio_h, $GUI_DISABLE)
Local $RadioRef = 'Absolut'
If BitAND(GUICtrlRead($AbsolutRadio_h), $GUI_CHECKED) = $GUI_CHECKED Then GUICtrlSetState($WindowSiseNameChkbox_h, $GUI_ENABLE)
;Wenn kein Fenster Ausgwählt ist (kein Name):
ElseIf WindowAnalyse() = 0 Then ; eine leere Zeichenkette ("") ist ein Boolean False
ConsoleWrite($Radio & ' (' & @ScriptLineNumber & ' )' & $WindowName_REF & @CRLF)
GUICtrlSetData($CordelMouseModeLabel_h, $Radio)
GUICtrlSetState($DrawRectButten_h, $GUI_ENABLE)
; RadioButton
GUICtrlSetState($AbsolutRadio_h, $GUI_ENABLE + $GUI_CHECKED)
GUICtrlSetState($RelWindowRadio_h, $GUI_DISABLE)
GUICtrlSetState($RelClientRadio_h, $GUI_DISABLE)
Local $RadioRef = 'Absolut'
If BitAND(GUICtrlRead($AbsolutRadio_h), $GUI_CHECKED) = $GUI_CHECKED Then GUICtrlSetState($WindowSiseNameChkbox_h, $GUI_ENABLE)
[/autoit] [autoit][/autoit] [autoit]ElseIf BitAND(GUICtrlRead($AbsolutRadio_h), $GUI_CHECKED) = $GUI_CHECKED Then
ConsoleWrite($Radio & ' (' & @ScriptLineNumber & ' )' & $WindowName_REF & @CRLF)
GUICtrlSetData($CordelMouseModeLabel_h, $Radio)
GUICtrlSetState($DrawRectButten_h, $GUI_ENABLE)
; RadioButton
GUICtrlSetState($AbsolutRadio_h, $GUI_ENABLE)
GUICtrlSetState($RelWindowRadio_h, $GUI_ENABLE)
GUICtrlSetState($RelClientRadio_h, $GUI_ENABLE)
Local $RadioRef = 'Absolut'
ElseIf BitAND(GUICtrlRead($RelWindowRadio_h), $GUI_CHECKED) = $GUI_CHECKED Then
ConsoleWrite($Radio & ' (' & @ScriptLineNumber & ' )' & $WindowName_REF & @CRLF)
GUICtrlSetData($CordelMouseModeLabel_h, $Radio)
GUICtrlSetState($DrawRectButten_h, $GUI_ENABLE)
GUICtrlSetState($WindowSiseNameChkbox_h, $GUI_ENABLE)
; RadioButton
GUICtrlSetState($AbsolutRadio_h, $GUI_ENABLE)
GUICtrlSetState($RelWindowRadio_h, $GUI_ENABLE)
GUICtrlSetState($RelClientRadio_h, $GUI_ENABLE)
Local $RadioRef = 'RelWindow'
ElseIf BitAND(GUICtrlRead($RelClientRadio_h), $GUI_CHECKED) = $GUI_CHECKED Then
ConsoleWrite($Radio & ' (' & @ScriptLineNumber & ' )' & $WindowName_REF & @CRLF)
GUICtrlSetData($CordelMouseModeLabel_h, $Radio)
GUICtrlSetState($DrawRectButten_h, $GUI_ENABLE)
GUICtrlSetState($WindowSiseNameChkbox_h, $GUI_ENABLE)
; RadioButton
GUICtrlSetState($AbsolutRadio_h, $GUI_ENABLE)
GUICtrlSetState($RelWindowRadio_h, $GUI_ENABLE)
GUICtrlSetState($RelClientRadio_h, $GUI_ENABLE)
Local $RadioRef = 'RelClient'
EndIf
Select ;ENABEL/DISABEL Butten
Case BitAND(GUICtrlRead($AbsolutRadio_h), $GUI_CHECKED) = $GUI_CHECKED
;$GUI_ENABLE // posAbsolutInput_h
GUICtrlSetState($XposAbsolutInput_h, $GUI_ENABLE)
GUICtrlSetState($X2posAbsolutInput_h, $GUI_ENABLE)
GUICtrlSetState($YposAbsolutInput_h, $GUI_ENABLE)
GUICtrlSetState($Y2posAbsolutInput_h, $GUI_ENABLE)
;$GUI_DISABLE // posRelWindowInput_h
GUICtrlSetState($XposRelWindowInput_h, $GUI_DISABLE)
GUICtrlSetState($X2posRelWindowInput_h, $GUI_DISABLE)
GUICtrlSetState($YposRelWindowInput_h, $GUI_DISABLE)
GUICtrlSetState($Y2posRelWindowInput_h, $GUI_DISABLE)
;$GUI_DISABLE // posRelClientInput_h
GUICtrlSetState($XposRelClientInput_h, $GUI_DISABLE)
GUICtrlSetState($X2posRelClientInput_h, $GUI_DISABLE)
GUICtrlSetState($YposRelClientInput_h, $GUI_DISABLE)
GUICtrlSetState($Y2posRelClientInput_h, $GUI_DISABLE)
Case BitAND(GUICtrlRead($RelWindowRadio_h), $GUI_CHECKED) = $GUI_CHECKED
;$GUI_DISABLE // posAbsolutInput_h
GUICtrlSetState($XposAbsolutInput_h, $GUI_DISABLE)
GUICtrlSetState($X2posAbsolutInput_h, $GUI_DISABLE)
GUICtrlSetState($YposAbsolutInput_h, $GUI_DISABLE)
GUICtrlSetState($Y2posAbsolutInput_h, $GUI_DISABLE)
;$GUI_ENABLE // posRelWindowInput_h
GUICtrlSetState($XposRelWindowInput_h, $GUI_ENABLE)
GUICtrlSetState($X2posRelWindowInput_h, $GUI_ENABLE)
GUICtrlSetState($YposRelWindowInput_h, $GUI_ENABLE)
GUICtrlSetState($Y2posRelWindowInput_h, $GUI_ENABLE)
;$GUI_DISABLE // posRelClientInput_h
GUICtrlSetState($XposRelClientInput_h, $GUI_DISABLE)
GUICtrlSetState($X2posRelClientInput_h, $GUI_DISABLE)
GUICtrlSetState($YposRelClientInput_h, $GUI_DISABLE)
GUICtrlSetState($Y2posRelClientInput_h, $GUI_DISABLE)
Case BitAND(GUICtrlRead($RelClientRadio_h), $GUI_CHECKED) = $GUI_CHECKED
;$GUI_DISABLE // posAbsolutInput_h
GUICtrlSetState($XposAbsolutInput_h, $GUI_DISABLE)
GUICtrlSetState($X2posAbsolutInput_h, $GUI_DISABLE)
GUICtrlSetState($YposAbsolutInput_h, $GUI_DISABLE)
GUICtrlSetState($Y2posAbsolutInput_h, $GUI_DISABLE)
;$GUI_ENABLE // posRelWindowInput_h
GUICtrlSetState($XposRelWindowInput_h, $GUI_DISABLE)
GUICtrlSetState($X2posRelWindowInput_h, $GUI_DISABLE)
GUICtrlSetState($YposRelWindowInput_h, $GUI_DISABLE)
GUICtrlSetState($Y2posRelWindowInput_h, $GUI_DISABLE)
;$GUI_ENABLE // posRelClientInput_h
GUICtrlSetState($XposRelClientInput_h, $GUI_ENABLE)
GUICtrlSetState($X2posRelClientInput_h, $GUI_ENABLE)
GUICtrlSetState($YposRelClientInput_h, $GUI_ENABLE)
GUICtrlSetState($Y2posRelClientInput_h, $GUI_ENABLE)
EndSelect ;ENABEL/DISABEL Butten
Return $RadioRef
EndFunc ;==>RefCheck
Func HK_CALC()
Local $RadioRef = RefCheck()
ConsoleWrite('WindowAnalyse =' & WindowAnalyse() & ' (' & @ScriptLineNumber & ') ' & @CRLF)
For $i = 3 To 1 Step -1
If $i = 3 Then $Ref = 'Absolut'
If $i = 2 Then $Ref = 'RelWindow'
If $i = 1 Then $Ref = 'RelClient'
ConsoleWrite('$i =' & $i & ' (' & @ScriptLineNumber & ') ' & "$Ref = " & $Ref & @CRLF)
;Eval ($Ref) ; RelClient // RelWindow // Absolut
;Y2posRelWindowSolutionLabel_h
;YposRelClientInput_h
Local $XposRef = GUICtrlRead(Eval('Xpos' & $Ref & 'Input_h'))
Local $X2posRef = GUICtrlRead(Eval('X2pos' & $Ref & 'Input_h'))
Local $YposRef = GUICtrlRead(Eval('Ypos' & $Ref & 'Input_h'))
Local $Y2posRef = GUICtrlRead(Eval('Y2pos' & $Ref & 'Input_h'))
ConsoleWrite(' (' & @ScriptLineNumber & ') ' & "$XposRef = " & $XposRef & @CRLF)
ConsoleWrite(' (' & @ScriptLineNumber & ') ' & "$X2posRef = " & $X2posRef & @CRLF)
ConsoleWrite(' (' & @ScriptLineNumber & ') ' & "$YposRef = " & $YposRef & @CRLF)
ConsoleWrite(' (' & @ScriptLineNumber & ') ' & "$Y2posRef = " & $Y2posRef & @CRLF)
If StringIsDigit (GUICtrlRead(Eval('Xpos' & $Ref & 'Input_h'))) Then $XposRef = Number (GUICtrlRead(Eval('Xpos' & $Ref & 'Input_h')))
If StringIsDigit (GUICtrlRead(Eval('X2pos' & $Ref & 'Input_h'))) Then $X2posRef = Number (GUICtrlRead(Eval('X2pos' & $Ref & 'Input_h')))
If StringIsDigit (GUICtrlRead(Eval('Ypos' & $Ref & 'Input_h'))) Then $YposRef = Number (GUICtrlRead(Eval('Ypos' & $Ref & 'Input_h')))
If StringIsDigit (GUICtrlRead(Eval('Y2pos' & $Ref & 'Input_h'))) Then $Y2posRef = Number (GUICtrlRead(Eval('Y2pos' & $Ref & 'Input_h')))
;ControleColore Red
If Not IsNumber ($XposRef) Then GUICtrlSetBkColor(Eval('Xpos' & $Ref & 'Input_h'), 0xFF1C1C)
If Not IsNumber ($X2posRef) Then GUICtrlSetBkColor(Eval('X2pos' & $Ref & 'Input_h'), 0xFF1C1C)
If Not IsNumber ($YposRef) Then GUICtrlSetBkColor(Eval('Ypos' & $Ref & 'Input_h'), 0xFF1C1C)
If Not IsNumber ($Y2posRef) Then GUICtrlSetBkColor(Eval('Y2pos' & $Ref & 'Input_h'), 0xFF1C1C)
;ControleColore Whit
If IsNumber ($XposRef) Then GUICtrlSetBkColor(Eval('Xpos' & $Ref & 'Input_h'), 0xFFFFFF)
If IsNumber ($X2posRef) Then GUICtrlSetBkColor(Eval('X2pos' & $Ref & 'Input_h'), 0xFFFFFF)
If IsNumber ($YposRef) Then GUICtrlSetBkColor(Eval('Ypos' & $Ref & 'Input_h'), 0xFFFFFF)
If IsNumber ($Y2posRef) Then GUICtrlSetBkColor(Eval('Y2pos' & $Ref & 'Input_h'), 0xFFFFFF)
Select
Case $Ref = "RelWindow" And WindowAnalyse() = 1
$XposRef = $XposRef + $WindowPos[0] ;[0] = x-Position // Left
$X2posRef = $X2posRef + $WindowPos[0] ;[0] = x-Position // Reight
$YposRef = $YposRef + $WindowPos[1] ;[1] = y-Position // Top
$Y2posRef = $Y2posRef + $WindowPos[1] ;[1] = y-Position // Bottom
ConsoleWrite('$i =' & $i & ' (' & @ScriptLineNumber & ') ' & "$Ref = " & $Ref & " $XposRef = " & $XposRef & '$WindowPos[0] = ' & $WindowPos[0] & @CRLF)
Case $Ref = "RelClient" And WindowAnalyse() = 1
$XposRef = $XposRef + $AbsolutClientPos_0_X
$X2posRef = $X2posRef + $AbsolutClientPos_0_X
$YposRef = $YposRef + $AbsolutClientPos_0_Y
$Y2posRef = $Y2posRef + $AbsolutClientPos_0_Y
ConsoleWrite('$i =' & $i & ' (' & @ScriptLineNumber & ') ' & "$Ref = " & $Ref & " $XposRef = " & $XposRef & "$AbsolutClientPos_0_X = " & $AbsolutClientPos_0_X & @CRLF)
Case WindowAnalyse() = '0' And Not $Ref = 'Absolut'
$XposRef = '#'
$X2posRef = '#'
$YposRef = '#'
$Y2posRef = '#'
SetError(1, @ScriptLineNumber, 1)
Return
EndSelect
GUICtrlSetData(Eval('Xpos' & $Ref & 'SolutionLabel_h'), '= ' & $XposRef)
GUICtrlSetData(Eval('X2pos' & $Ref & 'SolutionLabel_h'), '= ' & $X2posRef)
GUICtrlSetData(Eval('Ypos' & $Ref & 'SolutionLabel_h'), '= ' & $YposRef)
GUICtrlSetData(Eval('Y2pos' & $Ref & 'SolutionLabel_h'), '= ' & $Y2posRef)
ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $DrawRect = ' & $DrawRect & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console
IF $Ref = $RadioRef Then
Dim $PosRefOutput[6] = [6, $Ref, $XposRef, $YposRef, $X2posRef, $Y2posRef]
EndIf
Next
ConsoleWrite('-(' & @Scriptlinenumber &')'& @CRLF)
ConsoleWrite('$PosRefOutput[1] = ' & $PosRefOutput[1] & @TAB & '$PosRefOutput[0] = ' & $PosRefOutput[0] & @CRLF)
ConsoleWrite('$PosRefOutput[2]{X} = ' & $PosRefOutput[2] & @TAB & @TAB & '$PosRefOutput[3]{y} = ' & $PosRefOutput[3] & @CRLF)
ConsoleWrite('$PosRefOutput[4]{x2} = ' & $PosRefOutput[4] & @TAB & @TAB & '$PosRefOutput[5]{y2} = ' & $PosRefOutput[5] & @CRLF)
Return $PosRefOutput
EndFunc ;==>HK_CALC
;~ ;$GUI_DISABLE // posAbsolutInput_h
;~
;~ ;posRelWindowSolutionLabel_h
;~
;~
;~ GUICtrlSetData(Eval ('Xpos' & $Ref) )
;~ GUICtrlSetState($X2posRelWindowInput_h, $GUI_DISABLE)
;~ GUICtrlSetState($YposRelWindowInput_h, $GUI_DISABLE)
;~ GUICtrlSetState($Y2posRelWindowInput_h, $GUI_DISABLE)
;~ ;$GUI_ENABLE // posRelClientInput_h
;~ GUICtrlSetState($XposRelClientInput_h, $GUI_ENABLE)
;~ GUICtrlSetState($X2posRelClientInput_h, $GUI_ENABLE)
;~ GUICtrlSetState($YposRelClientInput_h, $GUI_ENABLE)
;~ GUICtrlSetState($Y2posRelClientInput_h, $GUI_ENABLE)
;~
;~
;~
;~
;~ Select
;~ Case Not $WindowName_REF = 0
;~ WindowAnalyse($WinHandel_REF)
;~
;~ Global $left = $WindowPos[0] + GUICtrlRead($Xpos_h)
;~ Global $top = $WindowPos[1] + GUICtrlRead($Ypos_h)
;~ Global $right = $WindowPos[0] + GUICtrlRead($X2pos_h)
;~ Global $bottom = $WindowPos[1] + GUICtrlRead($Y2pos_h)
;~
;~
;~ ;Top_Bill
;~ Local $Top_Bill_String = $WindowPos[0] & ' + ' & GUICtrlRead($Xpos_h) & ' = ' & $WindowPos[0] + GUICtrlRead($Xpos_h)
;~ GUICtrlSetData($Top_Bill_h, $Top_Bill_String)
;~
;~ ;Left_Bill
;~ Local $Left_Bill_String = $WindowPos[1] & ' + ' & GUICtrlRead($Ypos_h) & ' = ' & $WindowPos[1] + GUICtrlRead($Ypos_h)
;~ GUICtrlSetData($Left_Bill_h, $Left_Bill_String)
;~
;~ ;Reight_Bill
;~ Local $Reight_Bill_String = $WindowPos[0] & ' + ' & GUICtrlRead($X2pos_h) & ' = ' & $WindowPos[0] + GUICtrlRead($X2pos_h)
;~ GUICtrlSetData($Reight_Bill_h, $Reight_Bill_String)
;~
;~ ;Bottom_Bill
;~ Local $Bottom_Bill_String = $WindowPos[1] & ' + ' & GUICtrlRead($Y2pos_h) & ' = ' & $WindowPos[1] + GUICtrlRead($Y2pos_h)
;~ GUICtrlSetData($Bottom_Bill_h, $Bottom_Bill_String)
;~ Case $WindowName_REF = 0
;~ Global $left = GUICtrlRead($Xpos_h)
;~ Global $top = GUICtrlRead($Ypos_h)
;~ Global $right = GUICtrlRead($X2pos_h)
;~ Global $bottom = GUICtrlRead($Y2pos_h)
;~ EndSelect
Func DrawFrameButten();SetOnEvent
ConsoleWrite('+Function DrawFrameButten() Aufgerufen. (' & @ScriptLineNumber & ')' & @CRLF)
GetPosAndDrawFrame(10)
EndFunc ;==>DrawFrameButten
Func GetPosAndDrawFrame($iPosRefArray)
GUICtrlSetState($ClearRect_h, $GUI_ENABLE)
Global $DrawRect = 1
If IsArray($iPosRefArray) Then
Local $PosRefArray = $iPosRefArray
ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : IsArray($iPosRefArray)' & @CRLF)
ElseIf $iPosRefArray = 10 Then
Local $PosRefArray = HK_CALC()
ConsoleWrite('$PosRefArray[1] = ' & $PosRefArray[1] & @TAB & '$PosRefArray[0] = ' & $PosRefArray[0] & @CRLF)
ConsoleWrite('$PosRefArray[2] = ' & $PosRefArray[2] & @TAB & @TAB & '$PosRefArray[3] = ' & $PosRefArray[3] & @CRLF)
ConsoleWrite('$PosRefArray[4] = ' & $PosRefArray[4] & @TAB & @TAB & '$PosRefArray[5] = ' & $PosRefArray[5] & @CRLF)
EndIf
ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $PosRefArray[1] = ' & $PosRefArray[1] & @CRLF)
If IsArray($PosRefArray) Then
If $DrawRect = 1 And BitAND(GUICtrlRead(Eval($PosRefArray[1] & 'Radio_h')), $GUI_CHECKED) = $GUI_CHECKED Then
ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $DrawRect = ' & $DrawRect & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console
If $rectIsDrawn = 1 Then ClearFrame($hFrame)
Global $Change = 0
$hFrame = DrawFrame($PosRefArray[2], $PosRefArray[3], $PosRefArray[4], $PosRefArray[5], 20)
ConsoleWrite('> (' & @ScriptLineNumber & ') ' & @error & @CRLF)
If IsArray($hFrame) = 1 Then
Global $rectIsDrawn = 1
ConsoleWrite('$hFrame[1] = ' & $hFrame[1] & ', $hFrame[2] = ' & $hFrame[2] & @CRLF)
ConsoleWrite('$hFrame[3] = ' & $hFrame[3] & ', $hFrame[4] = ' & $hFrame[4] & @CRLF)
ConsoleWrite('$hFrame[5] = ' & $hFrame[5] & ', $hFrame[0] = ' & $hFrame[0] & @CRLF)
ConsoleWrite('$hFrame[10] = ' & $hFrame[10] & ', $hFrame[11] = ' & $hFrame[11] & @CRLF)
ConsoleWrite('$hFrame[12] = ' & $hFrame[12] & @CRLF)
EndIf
; Local $rectIsDrawn = 1
GUICtrlSetState($PixelCheck_h, $GUI_ENABLE)
EndIf
EndIf
EndFunc ;==>GetPosAndDrawFrame
Func HK_MouseGetPos()
AutoItSetOption("MouseCoordMode", 0) ;0 = relative Koordinaten zum aktiven Fenster
Local $MousePosRelWindow = MouseGetPos()
GUICtrlSetData($XposRelWindowInput_h, $MousePosRelWindow[0], "") ;x
GUICtrlSetData($YposRelWindowInput_h, $MousePosRelWindow[1], "") ;y
AutoItSetOption("MouseCoordMode", 1) ;1 = absolute Bildschirm Koordinaten (Standard)
Local $MousePosAbsolut = MouseGetPos()
GUICtrlSetData($XposAbsolutInput_h, $MousePosAbsolut[0]) ;x
GUICtrlSetData($YposAbsolutInput_h, $MousePosAbsolut[1]) ;y
AutoItSetOption("MouseCoordMode", 2) ;2 = relative Koordinaten zum Anwendungsbereich des aktiven Fensters
Local $MousePosRelClient = MouseGetPos()
GUICtrlSetData($XposRelClientInput_h, $MousePosRelClient[0]) ;x
GUICtrlSetData($YposRelClientInput_h, $MousePosRelClient[1]) ;y
ChangeLogger()
EndFunc ;==>HK_MouseGetPos
Func HK_MouseGetPos2()
AutoItSetOption("MouseCoordMode", 0) ;0 = relative Koordinaten zum aktiven Fenster
Local $MousePosRelWindow = MouseGetPos()
GUICtrlSetData($X2posRelWindowInput_h, $MousePosRelWindow[0], "") ;x
GUICtrlSetData($Y2posRelWindowInput_h, $MousePosRelWindow[1], "") ;y
AutoItSetOption("MouseCoordMode", 1) ;1 = absolute Bildschirm Koordinaten (Standard)
Local $MousePosAbsolut = MouseGetPos()
GUICtrlSetData($X2posAbsolutInput_h, $MousePosAbsolut[0]) ;x
GUICtrlSetData($Y2posAbsolutInput_h, $MousePosAbsolut[1]) ;y
AutoItSetOption("MouseCoordMode", 2) ;2 = relative Koordinaten zum Anwendungsbereich des aktiven Fensters
Local $MousePosRelClient = MouseGetPos()
GUICtrlSetData($X2posRelClientInput_h, $MousePosRelClient[0]) ;x
GUICtrlSetData($Y2posRelClientInput_h, $MousePosRelClient[1]) ;y
ChangeLogger()
EndFunc ;==>HK_MouseGetPos2
Func ChangeLogger()
Global $Change = 1
If $rectIsDrawn = 1 Then GUICtrlSetState($PixelCheck_h, $GUI_DISABLE)
ConsoleWrite('$Change =' & $Change & @CRLF)
HK_CALC()
EndFunc ;==>ChangeLogger
Func SpecialEvents()
Select
Case @GUI_CtrlId = $GUI_EVENT_CLOSE
ClearFrame($hFrame)
Exit
Case @GUI_CtrlId = $GUI_EVENT_MINIMIZE
Case @GUI_CtrlId = $GUI_EVENT_RESTORE
EndSelect
EndFunc ;==>SpecialEvents
Func ClearRectButten()
ClearFrame($hFrame)
Local $rectIsDrawn = 0
GUICtrlSetState($ClearRect_h, $GUI_DISABLE)
EndFunc ;==>ClearRectButten
Func KeyNameChkBox()
[/autoit] [autoit][/autoit] [autoit]EndFunc ;==>KeyNameChkBox
[/autoit] [autoit][/autoit] [autoit]Func IniWriteButten()
If BitAND(GUICtrlRead($ObjecktNameChkBox_h), $GUI_CHECKED) = $GUI_CHECKED Then
;Not GUICtrlRead($SectionInput_h) = 'Section' And BitAND(GUICtrlRead($IniPathCheckBox_h ), $GUI_CHECKED) = $GUI_CHECKED And BitAND(GUICtrlRead($IniNameCheckBox_h ), $GUI_CHECKED) = $GUI_CHECKED Then
$PathString = GUICtrlRead($IniPathInput_h) & '\' & GUICtrlRead($IniNameInput_h) & '.ini'
ConsoleWrite($PathString & @CRLF)
IniWrite($PathString, GUICtrlRead($SectionInput_h), GUICtrlRead($KeyNameInput_h), "Das ist ein neuer Wert")
Sleep(50)
ShellExecute($PathString, "", "", 'edit')
EndIf
EndFunc ;==>IniWriteButten
[/autoit] [autoit][/autoit] [autoit]Func HK_IniRead()
EndFunc ;==>HK_IniRead
Func WindowSiseNameChkbox()
IF WindowAnalyse() = 1 And BitAND(GUICtrlRead($WindowSiseNameChkbox_h), $GUI_CHECKED) = $GUI_CHECKED Then
Local $input = 'PosList' & $WindowPos[2] & 'x' & $WindowPos[3]
GUICtrlSetData($IniNameInput_h, $input, "")
EndIf
EndFunc ;==>WindowSiseNameChkbox
Func SectionNameInputButten()
Local $SectionName = GUICtrlRead($SectionNameInput_h)
If $SectionName <> "SectionName" Then ;geht nicht mit Not
GUICtrlSetState($SectionNameChkBox_h, $GUI_ENABLE)
ElseIf $SectionName = 'SectionName' Then
GUICtrlSetState($SectionNameChkBox_h, $GUI_DISABLE + $GUI_UNCHECKED)
EndIf
EndFunc ;==>SectionNameInputButten
Func DisplayArray()
[/autoit] [autoit][/autoit] [autoit]EndFunc ;==>DisplayArray
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]Func SectionNameCheckButten()
[/autoit] [autoit][/autoit] [autoit]EndFunc ;==>SectionNameCheckButten
[/autoit] [autoit][/autoit] [autoit]Func KeyNamePCSPos()
Local $PCSPosKey
Dim $PCSPosKey[5] = [6]
$PCSPosKey[1] = GUICtrlRead($KeyNameXpos_h)
$PCSPosKey[2] = GUICtrlRead($KeyNameYpos_h)
$PCSPosKey[3] = GUICtrlRead($KeyNameX2pos_h)
$PCSPosKey[4] = GUICtrlRead($KeyNameY2pos_h)
Local $ArraySearchOK = True
For $i = 1 To 4 Step 1
$ArraySearch = _ArraySearch($PCSPosKey, $PCSPosKey[$i], 1, "", 1, 1, 1, -1)
If $ArraySearch <> $i Then $ArraySearchOK = False
ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $ArraySearch = ' & $ArraySearch & ' $ArraySearchOK = ' & $ArraySearchOK & ' $i = ' & $i & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console
Next
If $ArraySearchOK = True Then
GUICtrlSetState($KeyNameChkBox_h, $GUI_ENABLE)
ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $ArraySearchOK = ' & $ArraySearchOK & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console
Return $PCSPosKey
ElseIf $ArraySearchOK = False Then
GUICtrlSetState($KeyNameChkBox_h, $GUI_DISABLE + $GUI_UNCHECKED)
ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $ArraySearchOK = ' & $ArraySearchOK & @CRLF & '>Error code: ' & @error & @CRLF) ;### Debug Console
Return False
EndIf
EndFunc ;==>KeyNamePCSPos
Func CreateArray()
$SectionName = GUICtrlRead($SectionInput_h)
EndFunc ;==>CreateArray
While 1
Sleep(1);Hat one Große CPU-Auslastung
WEnd
---------------------------------------------------------------------------
Das Include Könte für oben Erforderlich sein:
<DrawRectFunc.au3>
=================================================================
Spoiler anzeigen
#include-once
#include <Constants.au3>
#include <GDIPlus.au3>
#include <WinAPI.au3>
#include <WindowsConstants.au3>
ConsoleWrite('#incl.' & @TAB & '01' & ' - <DrawRectFunc.au3>' & @LF)
;DrawRectFunc.au3
;~ ;#include <ScreenCapture.au3>
;~ ;_ScreenCapture_Capture([$sFileName = "" [, $iLeft = 0 [, $iTop = 0 [, $iRight = -1 [, $iBottom = -1 [, $fCursor = True]]]]]])
;~ Local $test = DrawFrame(100, 50, 150, 100, 20)
;~ ConsoleWrite('> (' & @ScriptLineNumber & ') ' & @error & @CRLF)
;~ If IsArray($test) = 1 Then
;~ ConsoleWrite('$test[1] = ' & $test[1] & ', $test[2] = ' & $test[2] & @CRLF)
;~ ConsoleWrite('$test[3] = ' & $test[3] & ', $test[4] = ' & $test[4] & @CRLF)
;~ ConsoleWrite('$test[5] = ' & $test[5] & ', $test[0] = ' & $test[0] & @CRLF)
;~ ConsoleWrite('$test[10] = ' & $test[10] & ', $test[11] = ' & $test[11] & @CRLF)
;~ ConsoleWrite('$test[12] = ' & $test[12] & @CRLF)
;~ EndIf
;~ ;~
;~ If IsArray($test) = 0 Then ConsoleWrite(IsArray($test) & '$test = ' & $test & @CRLF)
;~ Sleep(1300)
;~ ClearFrame($test)
;~ Sleep(900)
;~ Local $test2 = DrawFrame('100', '50', '150', '100', 20)
;~ Sleep(1000)
;~ ClearFrame($test2)
Func DrawFrame($left, $top, $right, $bottom, $Rahmen = 20)
Dim $Array[14] = [14]
If StringIsDigit($left) Then $left = Number($left)
If StringIsDigit($top) Then $top = Number($top)
If StringIsDigit($right) Then $right = Number($right)
If StringIsDigit($bottom) Then $bottom = Number($bottom)
If StringIsDigit($Rahmen) Then $Rahmen = Number($Rahmen)
$Array[6] = $left
$Array[7] = $top
$Array[8] = $right
$Array[9] = $bottom
$Array[13] = $Rahmen
If Not IsNumber($left) Then $left = False
If Not IsNumber($top) Then $top = False
If Not IsNumber($right) Then $right = False
If Not IsNumber($bottom) Then $bottom = False
If Not IsNumber($Rahmen) Then $Rahmen = False
If $left = False Or $top = False Or $right = False Or $bottom = False Or $Rahmen = False Then
$Array[10] = @error
$Array[11] = @ScriptLineNumber
SetError(3)
$Array[12] = 'Input Is No Digit and Number'
Return $Array
EndIf
Local $t, $tt
ConsoleWrite('$left = ' & $left & ', $right = ' & $right & @CRLF)
ConsoleWrite('$top = ' & $top & ', $bottom = ' & $bottom & @CRLF)
If $left > $right Then ;Change
$t = $left
$left = $right
$right = $t
EndIf
If $top > $bottom Then ;Change
$tt = $top
$top = $bottom
$bottom = $tt
EndIf
ConsoleWrite('$left = ' & $left & ', $right = ' & $right & @CRLF)
ConsoleWrite('$top = ' & $top & ', $bottom = ' & $bottom & @CRLF)
If $top > $bottom Then ;Change
$tt = $top
$top = $bottom
$bottom = $tt
EndIf
ConsoleWrite('$left = ' & $left & ', $right = ' & $right & @CRLF)
ConsoleWrite('$top = ' & $top & ', $bottom = ' & $bottom & @CRLF)
Local $_GDIPlus_GraphicsDrawRectOK2
Local $iWidth_GUI = $right - $left + 2 * ($Rahmen)
Local $iHeight_GUI = $bottom - $top + 2 * ($Rahmen)
Local $iX_GUI = $left - ($Rahmen)
Local $iY_GUI = $top - ($Rahmen)
;
Local $iWidth_Rect1 = $right - $left + $Rahmen + 1
Local $iHeight_Rect1 = $bottom - $top + $Rahmen + 1
Local $iX_Rect1 = ($Rahmen / 2) ;X coordinate of the upper left corner
Local $iY_Rect1 = ($Rahmen / 2) ;Y coordinate of the upper left corner
;~
Local $iWidth_Rect2 = $right - $left + ($Rahmen) + 1
Local $iHeight_Rect2 = $bottom - $top + ($Rahmen) + 1
Local $iX_Rect2 = ($Rahmen / 2) ;X coordinate of the upper left corner
Local $iY_Rect2 = ($Rahmen / 2) ;Y coordinate of the upper left corner
;$Array[100] = @error
;$Array[101] = @scriptlinenumber
;$Array[102] = 'String'
$Array[1] = "RahmenGui"
;$Array[2] = $hGui
;$Array[3] = $hGraphic
;$Array[4] = $hPinsel1
;$Array[5] = $hPinsel2
Local $_GDIPlus_StartupOK = _GDIPlus_Startup()
If $_GDIPlus_StartupOK = False Then
$Array[10] = @error
$Array[11] = @ScriptLineNumber
SetError(1)
$Array[12] = '$_GDIPlus_StartupOK = ' & $_GDIPlus_StartupOK
Return $Array
EndIf
;$hGui Breite Höhe, Links/Left, Oben/Top
$Array[2] = GUICreate($Array[1], $iWidth_GUI, $iHeight_GUI, $iX_GUI, $iY_GUI, $WS_POPUP, BitOR($WS_EX_LAYERED, $WS_EX_TOPMOST))
If @error = 1 Then
$Array[10] = @error
$Array[11] = @ScriptLineNumber
SetError(2)
$Array[12] = 'GUICreate'
Return $Array
EndIf
WinSetOnTop($Array[2], "", 1)
GUISetBkColor(0xABCDEF) ;Setzt die Hintergrundfarbe (der wert der Farbe ist egal da dise in der Nächsten zeile auf Transparent gesetzt wird)
_WinAPI_SetLayeredWindowAttributes($Array[2], 0xABCDEF, 255) ;der Layer (Layer = eine lage eines Mehrschichtigen Fensters) mit der farbe "0xABCDEF" wird Transparent gestetzt durch den wert 255 = 100% transparent
GUISetState()
;hGraphic
$Array[3] = _GDIPlus_GraphicsCreateFromHWND($Array[2])
$Array[4] = _GDIPlus_PenCreate(0xFF0000FF, $Rahmen, 2) ;Blue Rect
$Array[5] = _GDIPlus_PenCreate(0xFFfa0aa0, ($Rahmen) / 4, 2) ;Pinc Rect
Local $_GDIPlus_GraphicsDrawRectOK1 = _GDIPlus_GraphicsDrawRect($Array[3], $iX_Rect1, $iY_Rect1, $iWidth_Rect1, $iHeight_Rect1, $Array[4]) ;Blue Rect
If $_GDIPlus_GraphicsDrawRectOK1 = 0 Then
$Array[10] = @error
$Array[11] = @ScriptLineNumber
SetError(3)
$Array[12] = '$_GDIPlus_StartupOK = ' & $_GDIPlus_StartupOK
Return $Array
EndIf
Local $_GDIPlus_GraphicsDrawRectOK1 = _GDIPlus_GraphicsDrawRect($Array[3], $iX_Rect1, $iY_Rect1, $iWidth_Rect1, $iHeight_Rect1, $Array[5]) ;Blue Rect
If $_GDIPlus_GraphicsDrawRectOK2 = 'False' Then
$Array[10] = @error
$Array[11] = @ScriptLineNumber
SetError(4)
$Array[12] = '$_GDIPlus_StartupOK = ' & $_GDIPlus_StartupOK
Return $Array
EndIf
Local $_WinAPI_SetWindowLongOK = _WinAPI_SetWindowLong($Array[2], $GWL_EXSTYLE, BitOR(_WinAPI_GetWindowLong($Array[2], $GWL_EXSTYLE), $WS_EX_TRANSPARENT));ClickThrough
If $_WinAPI_SetWindowLongOK = 0 Then
$Array[10] = @error
$Array[11] = @ScriptLineNumber
SetError(5)
$Array[12] = '$_GDIPlus_StartupOK = ' & $_GDIPlus_StartupOK
Return $Array
EndIf
$Array[10] = True
$Array[11] = @ScriptLineNumber
$Array[12] = True
Return $Array
EndFunc ;==>DrawFrame
;Erzeugt GUI$array['GuiName'] und Zeichnet Box
;$Array[1] = "Name"
;$Array[2] = $hGui
;$Array[3] = $hGraphic
;$Array[4] = $hPinsel1
;$Array[5] = $hPinsel2
Func ClearFrame($Array)
If IsArray($Array) Then
_GDIPlus_GraphicsClear($Array[3], 0xFFABCDEF)
;Global $hGui = GUICreate("RahmenGui", @DesktopWidth, @DesktopHeight, -1, -1, $WS_POPUP, $WS_EX_LAYERED)
GUIDelete($Array[2])
_GDIPlus_PenDispose($Array[4])
_GDIPlus_PenDispose($Array[5])
_GDIPlus_GraphicsDispose($Array[3])
_GDIPlus_Shutdown()
WinClose($Array[1], "")
EndIf
EndFunc ;==>ClearFrame
;~ Func GetAbsolutClientPos_0_Y($hwnd)
;~ Local $tpoint = DllStructCreate("int X;int Y") ;Erzeugt eine Struktur im C/C++-Stil die mit DllCall genutzt werden kann. Jeder Datentyp muss mit einem Semikolon getrennt werden ';',int : 32bit(4bytes) signed integer
;~ DllStructSetData($tpoint, "X", 0) ; Setzt Daten in einem Element der Struktur Syntax:DllStructSetData ( Struct, Element, value [, index] ), Struct: Struktur, zurückgegeben von DllStructCreate. , Element: Das Element in der Struktur, auf das man zugreifen möchte (beginnend bei 1) oder der Elementname, wie er mit DllStructCreate festgelegt wurde.
;~ DllStructSetData($tpoint, "Y", 0) ; value: Der neue Wert, der in die Struktur geschrieben werden soll.
;~ _WinAPI_ClientToScreen($hwnd, $tpoint)
;~ Return DllStructGetData($tpoint, "Y")
;~ EndFunc ;==>GetAbsolutClientPos_0_Y
;~ Func GetAbsolutClientPos_0_X($hwnd)
;~ Local $tpoint = DllStructCreate("int X;int Y") ;Erzeugt eine Struktur im C/C++-Stil die mit DllCall genutzt werden kann. Jeder Datentyp muss mit einem Semikolon getrennt werden ';',int : 32bit(4bytes) signed integer
;~ DllStructSetData($tpoint, "X", 0) ; Setzt Daten in einem Element der Struktur Syntax:DllStructSetData ( Struct, Element, value [, index] ), Struct: Struktur, zurückgegeben von DllStructCreate. , Element: Das Element in der Struktur, auf das man zugreifen möchte (beginnend bei 1) oder der Elementname, wie er mit DllStructCreate festgelegt wurde.
;~ DllStructSetData($tpoint, "Y", 0) ; value: Der neue Wert, der in die Struktur geschrieben werden soll.
;~ _WinAPI_ClientToScreen($hwnd, $tpoint)
;~ Return DllStructGetData($tpoint, "X")
;~ EndFunc ;==>GetClientPos_0_X
Func GetAbsolutClientPos_0_X($hwnd)
Local $tpoint = DllStructCreate("int X;int Y") ;Erzeugt eine Struktur im C/C++-Stil die mit DllCall genutzt werden kann. Jeder Datentyp muss mit einem Semikolon getrennt werden ';',int : 32bit(4bytes) signed integer
DllStructSetData($tpoint, "X", 0) ; Setzt Daten in einem Element der Struktur Syntax:DllStructSetData ( Struct, Element, value [, index] ), Struct: Struktur, zurückgegeben von DllStructCreate. , Element: Das Element in der Struktur, auf das man zugreifen möchte (beginnend bei 1) oder der Elementname, wie er mit DllStructCreate festgelegt wurde.
_WinAPI_ClientToScreen($hwnd, $tpoint)
Return DllStructGetData($tpoint, "X")
EndFunc ;==>GetAbsolutClientPos_0_X
Func GetAbsolutClientPos_0_Y($hwnd)
Local $tpoint = DllStructCreate("int X;int Y") ;Erzeugt eine Struktur im C/C++-Stil die mit DllCall genutzt werden kann. Jeder Datentyp muss mit einem Semikolon getrennt werden ';',int : 32bit(4bytes) signed integer
DllStructSetData($tpoint, "Y", 0) ; Setzt Daten in einem Element der Struktur Syntax:DllStructSetData ( Struct, Element, value [, index] ), Struct: Struktur, zurückgegeben von DllStructCreate. , Element: Das Element in der Struktur, auf das man zugreifen möchte (beginnend bei 1) oder der Elementname, wie er mit DllStructCreate festgelegt wurde.
_WinAPI_ClientToScreen($hwnd, $tpoint)
Return DllStructGetData($tpoint, "Y")
EndFunc ;==>GetAbsolutClientPos_0_Y
#CS PixelChecksum ( left, top, right, bottom [, step [, hwnd [, mode]]] )
left linke Koordinate des Rechtecks.
top obere Koordinate des Rechtecks.
right rechte Koordinate des Rechtecks.
bottom untere Koordinate des Rechtecks.
step [optional] Anstatt jedes Pixel in die Prüfsumme einzubeziehen, kann man einen Wert größer als 1 verwenden, um Pixel zu überspringen (schneller), z.B. wird ein Wert von 2 nur jedes zweite Pixel prüfen. Standard ist 1. Es wird nicht empfohlen, eine Schrittweite größer als 1 anzuwenden.
hwnd [optional] Handle des zu durchsuchenden Fensters
mode [optional] Standard 0 ADLER Prüfsumme , 1 CRC32 Prüfsumme.
;----------------------------------------------------------------------------------------------------
_GDIPlus_GraphicsDrawRect($hGraphics, $iX, $iY, $iWidth, $iHeight [, $hPen = 0])
$hGraphics Handle zu dem Grafik-Objekt
$iX Die X-Koordinate der oberen-linken Ecke des Rechtecks
$iY Die Y-Koordinate der oberen-linken Ecke des Rechtecks
$iWidth Die Breite des Rechtecks
$iHeight Die Höhe des Rechtecks
$hPen [optional] Handle zu dem Zeichenstift-Objekt, welches verwendet wird, um das Rechteck zu zeichnen. Falls 0, wird ein vollfarbig schwarz gefüllter Zeichenstift mit einer Breite von 1 verwendet.
_GDIPlus_GraphicsDrawRect($hGraphics, $iX, $iY, $iWidth, $iHeight [, $hPen = 0])
#ce
; $WS_EX_LAYERED 0x00080000 Erstellt ein Fenster mit mehreren Schichten. Es ist zu beachten, dass dieser Stil nicht für „child“-Fenster verwendet werden kann.
; $WS_POPUP 0x80000000 Erzeugt ein Pop-up-Fenster. Dieser Stil kann nicht gemeinsam mit dem Stil WS_CHILD verwendet werden.
#CS
Erzeugt ein Zeichenstift Objekt
_GDIPlus_PenCreate([$iARGB = 0xFF000000 [, $nWidth = 1 [, $iUnit = 2]]])
Parameter
$iARGB [optional] Alpha, Rot, Grün und Blau-Komponenten der Zeichenstiftfarbe
$nWidth [optional] Die Breite des Zeichenstiftes, gemessen in den Einheiten, die im $iUnit-Parameter festgelegt sind.
$iUnit [optional] Maßeinheit für die Zeichenstiftgröße:
0 - Welt-Koordinaten, eine nicht-physikalische Einheit
1 - Darstellungseinheiten
2 - Eine Einheit ist 1 Pixel
3 - Eine Einheit ist 1 Punkt oder 1/72 Zoll
4 - Eine Einheit ist 1 Zoll
5 - Eine Einheit ist 1/300 Zoll
6 - Eine Einheit ist 1 Millimeter
#CE
;~ Func _ende()
[/autoit] [autoit][/autoit] [autoit];~ WinKill("RahmenGui", "")
;~ If WinExists("RahmenGui", "") Then ProcessClose("AutoIt3.exe")
;~ Exit
;~ EndFunc ;==>_ende
;~ Global $hGui, $hGraphic, $Pinsel_HNDL1, $Pinsel_HNDL2, $Pixelchecksum = 0
[/autoit] [autoit][/autoit] [autoit];~ Func PixelCheckSumBalken($left, $top, $right, $bottom, $delayPostPixelCheck = 200, $Rahmen = 20, $step = 1, $hwnd = -1, $Mode = 0, $delayPrePixelCheck = 200)
[/autoit] [autoit][/autoit] [autoit];~ ; Global Const $GWL_EXSTYLE = -20
;~ ;Global $dll = DllOpen("user32.dll")
;~ ;~
;~ Local $iWidth_GUI = $right - $left + 2 * ($Rahmen)
;~ Local $iHeight_GUI = $bottom - $top + 2 * ($Rahmen)
;~ Local $iX_GUI = $left - ($Rahmen)
;~ Local $iY_GUI = $top - ($Rahmen)
;~ ;~
;~ Local $iWidth_Rect1 = $right - $left + $Rahmen + 1
;~ Local $iHeight_Rect1 = $bottom - $top + $Rahmen + 1
;~ Local $iX_Rect1 = ($Rahmen / 2)
;~ Local $iY_Rect1 = ($Rahmen / 2)
;~ ;~
;~ Local $iWidth_Rect2 = $right - $left + ($Rahmen) + 1
;~ Local $iHeight_Rect2 = $bottom - $top + ($Rahmen) + 1
;~ Local $iX_Rect2 = ($Rahmen / 2)
;~ Local $iY_Rect2 = ($Rahmen / 2)
;~ ;_GDIPlus_GraphicsDrawRect ( $hGraphic, $iX_Rect1 + ($Rahmen)/4, $iY_Rect + ($Rahmen)/4, $iWidth_Rect - $Rahmen + ($Rahmen)/2, $iHeight_Rect-$Rahmen+($Rahmen)/2, $vanish)
;~ ;MsgBox (32, "tittel", "$iX = " & $iX & @CRLF & "$iY = " & $iY & @CRLF & "$iWidth =" & $iWidth & @CRLF & "$iHeight = " & $iHeight)
;~ _GDIPlus_Startup()
;~ ; Left, Top
;~
;~ ;Erzeugt GUI"RahmenGui" und Zeichnet Box
;~ WinSetOnTop("RahmenGui", "", 1)
;~ GUISetBkColor(0xABCDEF) ;Setzt die Hintergrundfarbe (der wert der Farbe ist egal da dise in der Nächsten zeile auf Transparent gesetzt wird)
;~ _WinAPI_SetLayeredWindowAttributes($hGui, 0xABCDEF, 255) ;der Layer (Layer = eine lage eines Mehrschichtigen Fensters) mit der farbe "0xABCDEF" wird Transparent gestetzt durch den wert 255 = 100% transparent
;~ GUISetState()
;~ Global $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGui)
;~ Global $Pinsel_HNDL1 = _GDIPlus_PenCreate(0xFF0000FF, $Rahmen, 2)
;~ Global $Pinsel_HNDL2 = _GDIPlus_PenCreate(0xFFfa0aa0, ($Rahmen) / 4, 2)
;~ _GDIPlus_GraphicsDrawRect($hGraphic, $iX_Rect1, $iY_Rect1, $iWidth_Rect1, $iHeight_Rect1, $Pinsel_HNDL1)
;~ _GDIPlus_GraphicsDrawRect($hGraphic, $iX_Rect1, $iY_Rect2, $iWidth_Rect2, $iHeight_Rect2, $Pinsel_HNDL2)
;~ _WinAPI_SetWindowLong($hGui, $GWL_EXSTYLE, BitOR(_WinAPI_GetWindowLong($hGui, $GWL_EXSTYLE), $WS_EX_TRANSPARENT));ClickThrough
;~ Sleep($delayPrePixelCheck)
;~ ;Erzeugt GUI"RahmenGui" und Zeichnet Box