-
Recently Browsing 0 members
No registered users viewing this page.
-
Similar Content
-
By DirtyJohny
Hi everyone.I need did my script is portable.I use @ScriptDir and trying use one command Example: RunWait(@ComSpec & '/ c copy /y ' & @ScriptDir & ' "\LOGUS\Logus.HMS.Desktop.lnk" "\\' & $rHostName & '\C$"') but it doesn't work for me.Please need for help.Thanks for your experience.Sorry for my English,I'm Russian...
#include <GUIConstantsEx.au3> #include <EditConstants.au3> #include <ButtonConstants.au3> #include <WindowsConstants.au3> #include <GuiListView.au3> #include <MsgBoxConstants.au3> #include <String.au3> #include <Crypt.au3> #include <WinAPISysWin.au3> #RequireAdmin #NoTrayIcon Opt("GUIOnEventMode", 1) Global $Assets = @ScriptDir & "\Assets\" Global $cUI_BK = 0x02101B Global $cContent_BK = 0x091926 Global $cText = 0xDEDEDE Global $cTextA = 0x56CBDD Global $cCardBk = 0x0C1C29 Global $lastMenu = Default Global $isOnTop = False Global $ui_w = 800 Global $ui_h = 520 Global $topPanel_h = CalcPercent(12, $ui_h) Global $bottomPanel_h = CalcPercent(8, $ui_h) Global $bottomPanel_y = $ui_h - $bottomPanel_h Global $leftPanel_w = CalcPercent(25, $ui_w) Global $contentPanel_x = $leftPanel_w Global $contentPanel_y = $topPanel_h Global $contentPanel_w = $ui_w - $leftPanel_w Global $contentPanel_h = $ui_h - ($topPanel_h + $bottomPanel_h) Global $UI = GUICreate("Experience UI", $ui_w, $ui_h) ; $WS_POPUP, $WS_EX_CONTROLPARENT WinSetTrans($UI, "", 0); GUISetState(@SW_SHOW, $UI) For $i = 0 To 243 Step 2 WinSetTrans($UI, "", $i);Прозрачность 0-255 Next GUISetOnEvent(-3, "Terminate", $UI) GUISetBkColor($cUI_BK, $UI) Global $topPanel = GUICtrlCreateLabel("", 0, 0, $ui_w, $topPanel_h) ; height = 12% from UI | (ps. $GUI_WS_EX_PARENTDRAG) GUICtrlSetState($topPanel, 128) ; $GUI_DISABLE GUICtrlSetBkColor($topPanel, $cUI_BK) Global $bottomPanel = GUICtrlCreateLabel("", 0, $bottomPanel_y, $ui_w, $bottomPanel_h) GUICtrlSetState($bottomPanel, 128) ; $GUI_DISABLE GUICtrlSetBkColor($bottomPanel, $cUI_BK) Global $leftPanel = GUICtrlCreateLabel("", 0, $topPanel_h, $leftPanel_w, $ui_h - ($topPanel_h + $bottomPanel_h)) GUICtrlSetState($leftPanel, 128) ; $GUI_DISABLE GUICtrlSetBkColor($leftPanel, $cUI_BK) Global $contentPanel = GUICtrlCreateLabel("", $contentPanel_x, $contentPanel_y, $contentPanel_w, $contentPanel_h) GUICtrlSetState($contentPanel, 128) ; $GUI_DISABLE GUICtrlSetBkColor($contentPanel, $cContent_BK) $y = $bottomPanel_y + (($bottomPanel_h / 2) - (28 / 2)) GUICtrlCreateLabel("© 2020 by DiJo.", 10, $y, $leftPanel_w - 38, 28, 0x0200) GUICtrlSetFont(-1, 8, Default, Default, "Segoe UI", 5) ; 5 = Clear Type GUICtrlSetColor(-1, $cText) Global $y = $topPanel_h GUICtrlCreateLabel(" FNKC Pack", 52, $y, $leftPanel_w - 52, 32, 0x0200) GUICtrlSetFont(-1, 12, 600, Default, "Segoe UI", 5) ; 5 = Clear Type GUICtrlSetColor(-1, $cText) $y += 50 Global $vDashboard = GUICtrlCreateLabel("Mode 1", 38, $y, $leftPanel_w - 38, 32, 0x0200) GUICtrlSetOnEvent(-1, "DashboardEvent") GUICtrlSetFont(-1, 11, 600, Default, "Segoe UI", 5) ; 5 = Clear Type GUICtrlSetColor(-1, $cTextA) GUICtrlSetCursor(-1, 0) $lastMenu = $vDashboard $y += 32 Global $vWallet = GUICtrlCreateLabel("Mode 2", 38, $y, $leftPanel_w - 38, 32, 0x0200) GUICtrlSetOnEvent(-1, "WalletEvent") GUICtrlSetFont(-1, 11, 600, Default, "Segoe UI", 5) ; 5 = Clear Type GUICtrlSetColor(-1, $cText) GUICtrlSetCursor(-1, 0) $y += 32 Global $vMessages = GUICtrlCreateLabel("Mode 3", 38, $y, $leftPanel_w - 38, 32, 0x0200) GUICtrlSetOnEvent(-1, "MessagesEvent") GUICtrlSetFont(-1, 11, 600, Default, "Segoe UI", 5) ; 5 = Clear Type GUICtrlSetColor(-1, $cText) GUICtrlSetCursor(-1, 0) $y = ($topPanel_h + 50) Global $vIndicator = GUICtrlCreateLabel("", 0, $y, 4, 32) GUICtrlSetBkColor(-1, $cTextA) $x = $contentPanel_x + 10 $y = $contentPanel_y + 15 Global $iHostName = GUICtrlCreateInput("", $x + 200, $y + 10, 180, 21) Global $Button1 = GUICtrlCreateButton("Ping", $x, $y + 80, 267, 43) GUICtrlSetFont(-1, 8, 800, 0, "Tahoma") ;задаем стиль элементу выше GUICtrlSetColor(-1, 0xFFFFFF) GUICtrlSetBkColor(-1, 0x0E0C2E) GUICtrlSetOnEvent(-1, "_Didshit1") Global $Button2 = GUICtrlCreateButton("Logus", $x + 310, $y + 80, 267, 43) GUICtrlSetFont(-1, 8, 800, 0, "Tahoma") ;задаем стиль элементу выше GUICtrlSetColor(-1, 0xFFFFFF) GUICtrlSetBkColor(-1, 0x0E0C2E) GUICtrlSetOnEvent(-1, "_Didshit2") Global $Button3 = GUICtrlCreateButton("Start", $x, $y + 140, 267, 43) ;создаем кнопку подключения GUICtrlSetFont(-1, 8, 800, 0, "Tahoma") ;задаем стиль элементу выше GUICtrlSetColor(-1, 0xFFFFFF) GUICtrlSetBkColor(-1, 0x0E0C2E) Global $Checkbox1 = GUICtrlCreateCheckbox("", $x + 273, $y + 95, 12, 12) Global $Checkbox2 = GUICtrlCreateCheckbox("", $x + 293, $y + 95, 12, 12) GUISetState() ; Show GUI Global $rHostName While True Sleep(10) WEnd Func DashboardEvent() If $lastMenu <> $vDashboard Then Local $CGP = ControlGetPos($UI, '', $vDashboard) GUICtrlSetPos($vIndicator, 0, $CGP[1]) GUICtrlSetColor($vDashboard, $cTextA) GUICtrlSetColor($lastMenu, $cText) $lastMenu = $vDashboard GUICtrlSetState($Button1, $GUI_SHOW) GUICtrlSetState($Button2, $GUI_SHOW) GUICtrlSetState($Checkbox1, $GUI_SHOW) GUICtrlSetState($Checkbox2, $GUI_SHOW) ConsoleWrite(1) EndIf EndFunc ;==>DashboardEvent Func WalletEvent() If $lastMenu <> $vWallet Then Local $CGP = ControlGetPos($UI, '', $vWallet) GUICtrlSetPos($vIndicator, 0, $CGP[1]) GUICtrlSetColor($vWallet, $cTextA) GUICtrlSetColor($lastMenu, $cText) $lastMenu = $vWallet GUICtrlSetState($Button1, $GUI_HIDE) GUICtrlSetState($Button2, $GUI_HIDE) GUICtrlSetState($Checkbox1, $GUI_HIDE) GUICtrlSetState($Checkbox2, $GUI_HIDE) ConsoleWrite(1) EndIf EndFunc ;==>WalletEvent Func MessagesEvent() If $lastMenu <> $vMessages Then Local $CGP = ControlGetPos($UI, '', $vMessages) GUICtrlSetPos($vIndicator, 0, $CGP[1]) GUICtrlSetColor($vMessages, $cTextA) GUICtrlSetColor($lastMenu, $cText) $lastMenu = $vMessages GUICtrlSetState($Button1, $GUI_HIDE) GUICtrlSetState($Button2, $GUI_HIDE) GUICtrlSetState($Checkbox1, $GUI_HIDE) GUICtrlSetState($Checkbox2, $GUI_HIDE) ConsoleWrite(1) EndIf EndFunc ;==>MessagesEvent Func _Didshit1() $rHostName = GUICtrlRead($iHostName) Run(@ComSpec & ' /c C:\Windows\System32\Ping.exe ' & $rHostName & ' -t') EndFunc ;==>_Didshit1 Func _Didshit2() $rHostName = GUICtrlRead($iHostName) RunWait(@ComSpec & ' /c PsPasswd \\' & $rHostName & ' Администратор Mik35') RunWait(@ComSpec & ' /c copy /y "C:\Progra~2\DiJo\LOGUS\Logus.bat" "\\' & $rHostName & '\C$"') RunWait(@ComSpec & ' /c copy /y "C:\Progra~2\DiJo\LOGUS\Logus.HMS.Desktop.lnk" "\\' & $rHostName & '\C$"') RunWait(@ComSpec & ' /c psexec \\' & $rHostName & ' -u Администратор -p Mik35 cmd.exe /c "C:\Logus.bat"') EndFunc ;==>_Didshit2 Func Terminate() GUIDelete($UI) Exit EndFunc ;==>Terminate Func Minimize() GUISetState(@SW_MINIMIZE, $UI) EndFunc ;==>Minimize Func Topmost() If $isOnTop = False Then WinSetOnTop($UI, Default, 1) $isOnTop = True Else WinSetOnTop($UI, Default, 0) $isOnTop = False EndIf EndFunc ;==>Topmost Func CalcPercent($vPercent, $vInt) ; Calculate percent % :) Return $vPercent * $vInt / 100 EndFunc ;==>CalcPercent
-
By Fr33b0w
Func z009() If FileExists("search\009\009.au3") Then #include <search\009\009.au3> EndIf EndFunc This wont work... Is there any workarround for this or I should do it in a different way?
-
By ur
I have recorded a gui installation and modified the au3 file as per my requirement.
But the problem is, whenever I try to compile the au3 file, I am getting a special character on top of the file.
Can you suggest how to resolve this as it is appearing everytime during compilation.
And also I am trying to include a au3 file which is separate folder so I am adding the <..\Library.au3> line.
It is able to pick that but in that file "Library.au3" there is a file install line.
FileInstall(".\SendMail.ps1", @ScriptDir & "\SendMail.ps1") Library.au3 is being used by many other codes in the previous folder..
But the current file is looking for the ps1 file in current folder.
So is there any option to tell the compiler to pick the dependent files relative to Library.au3 instead of the current code.
-
By pedrit0
Hi all.
I have created an external au3 (a library of functions and vars) that is #included in a main script that i must compile.
I wish that the content of the library is not merged with the main script when compiling.
My goal is to keep the ability to modify the library even after the main exe is compiled and that these changes are effective when executing the exe.
I guess this is not possible using the standard #include method.
Is there a way to do that ?
thx a lot :-)
-
By xiantez
Hey AutoIT Community,
Just wanted to know if there is a way I can #include all *.au3 files in my script without having to #include each individual .au3 file. For instance, currently I have a laundry list of #includes like this:
#include <IE.au3>
#include <Inet.au3>
#include <AutoItConstants.au3>
#include <GUIConstantsEx.au3>
#include <GDIPlus.au3>
#include <GuiMenu.au3>
[ECT...ECT...]
Would there be a way I could include all of the files above or all .au3 file in a one liner? That way I do not have to burn up a bunch of lines of code for just my includes.... Your help is greatly appreciated...
-