Jump to content

Krikov

Active Members
  • Posts

    72
  • Joined

  • Last visited

Everything posted by Krikov

  1. Hi first of all you can try to complie the PY File to EXE like PY2EXE take a look at this link :http://www.ehow.com/how_2091641_compile-python-code.html or try to use the Pyton.exe Audio_Play.py sound.mp3 and the Autoit Command will : $Run = RunWait("C:\Pyton25\Pyton.exe Audio_Play.py sound.mp3","") Krikov
  2. Hello, i am having problem to create _GuiCtrlIpAddress_Create in Tab when i set the First Parameter as the Form its OK is any one know how to fix it Thanks, Krikov
  3. Hi You can use the command line switch of the mstsc take a look : --------------------------- Remote Desktop Connection Usage --------------------------- MSTSC [<connection file>] [/v:<server[:port]>] [/admin] [/f[ullscreen]][/w:<width> /h:<height>] [/public] | [/span] [/edit "connection file"] /migrate] "connection file" -- Specifies the name of an .rdp file for the connection. /v:<server[:port]> -- Specifies the remote computer to which you want to connect. /admin -- Connects you to the session for administering a server. /f -- Starts Remote Desktop in full-screen mode. /w:<width> -- Specifies the width of the Remote Desktop window. /h:<height> -- Specifies the height of the Remote Desktop window. /public -- Runs Remote Desktop in public mode. /span -- Matches the remote desktop width and height with the local virtual desktop, spanning across multiple monitors if necessary. To span across monitors, the monitors must all have the same height and be aligned vertically. /edit -- Opens the specified .rdp connection file for editing. /migrate -- Migrates legacy connection files that were created with Client Connection Manager to new .rdp connection files. Hope this will help you Krikov
  4. This script is for my work, i am try to write afile to some directory in a do...until some time i want to stop the loop and do some changes so i wanted to loop the file create until i press the stop button which is $Button3 Krikov
  5. Thanks but its wont work on my script Anyone what is worng with the script 1. when i press the run its create the file 2 when i press the Stop it's wont working please help [code] #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Compression=4 #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Include <Date.au3> $INIFile = @ScriptDir&"\Last.ini" $ini_Directory = IniRead($INIFile,"Data","Directory","") $ini_FileName = IniRead($INIFile,"Data","FileName","") $ini_Sleep = IniRead($INIFile,"Data","Sleep","1") $ini_RSH = IniRead($INIFile,"Data","RSH","RSH Command") #Region ### START Koda GUI section ### Form=c:\documents and settings\admin\my documents\filecreate_form.kxf $Form1_1 = GUICreate("File Creator V1.0", 633, 447, 193, 170) $Label1 = GUICtrlCreateLabel("Directory Path :", 8, 18, 77, 17) $Input1 = GUICtrlCreateInput($ini_Directory, 88, 16, 393, 21) $Button1 = GUICtrlCreateButton("Browse...", 488, 16, 75, 25, 0) $Label2 = GUICtrlCreateLabel("File Name:", 8, 48, 54, 17) $Input2 = GUICtrlCreateInput($ini_FileName, 88, 48, 121, 21) $Button2 = GUICtrlCreateButton("Run", 16, 408, 75, 25, 0) $Button3 = GUICtrlCreateButton("Stop", 104, 408, 75, 25, 0) $Button4 = GUICtrlCreateButton("Exit", 544, 408, 75, 25, 0) $Input3 = GUICtrlCreateInput($ini_Sleep, 152, 80, 41, 21) GUICtrlCreateUpdown(-1) $Label3 = GUICtrlCreateLabel(" Create New File Each (sec)", 8, 80, 136, 17) $Group1 = GUICtrlCreateGroup("RSH Command Tool", 8, 136, 609, 57) $Input4 = GUICtrlCreateInput($ini_RSH, 16, 160, 593, 21) GUICtrlSetState($Input4,$GUI_DISABLE) GUICtrlSetState($Button3,$GUI_DISABLE) GUICtrlCreateGroup("", -99, -99, 1, 1) $Checkbox1 = GUICtrlCreateCheckbox("Send RSH Command", 8, 112, 200, 17) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button4 ; Exit Button Command Exit Case $Button1 ; Set File Path $Folder_Dest = FileSelectFolder("Choose a folder.", "") GUICtrlSetData($Input1,$Folder_Dest&"\") Case $Checkbox1 ; RSH Commnad Tool If GUICtrlRead($Checkbox1) = $GUI_CHECKED Then GUICtrlSetState($Input4,$GUI_ENABLE) Else GUICtrlSetState($Input4,$GUI_DISABLE) EndIf Case $Button2 GUICtrlSetState($Button2,$GUI_DISABLE) GUICtrlSetState($Button3,$GUI_ENABLE) IniWrite($INIFile,"Data","Directory",GUICtrlRead($Input1)) IniWrite($INIFile,"Data","FileName",GUICtrlRead($Input2)) IniWrite($INIFile,"Data","Sleep",GUICtrlRead($Input3)) Do FileWriteLine(GUICtrlRead($Input1)&GUICtrlRead($Input2)&"-"&@MDAY&"_"&@MON&"_"&@YEAR&"-"&@HOUR&"_"&@MIN&"_"&@SEC&"_"&@MSEC,"This File Was Update in "&_Now()) Sleep(GUICtrlRead($Input3)*1000) Until GUICtrlSetState($Button2,$GUI_ENABLE) GUICtrlSetState($Button3,$GUI_DISABLE) EndSwitch WEnd Thanks Krikov
  6. Hi how can i create a loop with do and until button is pressed and when the button is pressed the loop stop. Do Some Action Sleep(1000) Until $Button1 Krikov
  7. Hi, i am try to read the status of a external application checkbox and didnt find the currect function any help ? what i am trying to do is open an HP Network configuration control panel and then manipulate some clicks to configure it automatically but i have some check boxes that is need to get them status before i just click on them. Thanks, Krikov
  8. Thanks i will look for it
  9. Hi is it posible to write code with more then one while or make that script working <code> While 1 if ProcessExists("Notepad.exe") Then ConsoleWrite("notepad" & @CRLF) Sleep(2000) EndIf WEnd While 1 if ProcessExists("Winword.exe") Then ConsoleWrite("BBB" & @CRLF) Sleep(2000) EndIf WEnd </code> Krikov
  10. cuz my OS is XP and not vista any more idea??? Krikov
  11. Hello, i have searching the forum and didnt find any answre to use Runas() and stiil be able to write to the HKCU Key. 1. My Current User dont Have any Premission 2. i am try to Write to the HKCU some changes to the Realtek Driver (it's must use the HKCU) What can i do to solve it ?? Best Regards Krikov
  12. Hi Here is the Function MouseMove ( x, y [, speed] ) When the Speed i range 1 - 100 Krikov
  13. Hi Try FileGetShortcut Function Krikov
  14. TheGam in my work i use the XCALC at the logon script so when you use the RunAsSet You can do anything no problem for you RunAsSet ( "user", "domain", "password" ) Run("Xcalc") Krikov
  15. Hello as far as i know there is no Function to Change Permision with Native Autoit Script But You Can Use XCALC From Microsoft This is a Command line that allow you to add remove and change ntfs premision and share premision take a look at that: http://www.ss64.com/nt/xcalcs.html and there is an VBS Script that do the same thing but its little hard for me to convert it to Autoit Script Krikov
  16. Thanks But when i try the ShellExecuteWait i still get the same error The system cannot find the file specified. the only way that i waz sucessed to run the Python script is with _RunDos but this is not very good for me cuz when i try to select a folder with Hebrew Characters the Dos Windows Show me gibberish font and the script not running so i must solve it with RunWait or ShellExecuteWait Krikov
  17. Hello, did any one try ever to run Python Script From Autoit My Problem is to Run an Python Script With Two Parameters that i read from 2 Input Box when i run the script i get "File Not Found" Python Code import sys; import glob; import os; dirs = []; def listFiles( outFile, path ): files = glob.glob( path + "\\*" ); for f in files: sys.stderr.write( f + "\n" ); if os.path.isfile( f ): outFile.write( f + "\n" ); if os.path.isdir( f ): dirs.append( f ); def main( argv ): FROM_PARAM_INDEX = 1; TO_PARAM_INDEX = 2; LIST_FROM = argv[FROM_PARAM_INDEX]; LIST_TO = argv[TO_PARAM_INDEX]; dirs.append( LIST_FROM ); outFile = file( LIST_TO, "w" ); while ( len(dirs) > 0 ): dir = dirs.pop( 0 ); listFiles( outFile, dir ); outFile.close(); if __name__ == "__main__": sys.exit( main( sys.argv ) ); And This is The Run Command RunWait("ListFile.py "&(GUICtrlRead($Input1))&" "&(GUICtrlRead($Input2))) The system cannot find the file specified.
  18. Hi This is My First Published Script KQM = Krikov Quick Menu Tray Menu Smart And Clean Thanks to Jos For Some Help The Tray Menu #NoTrayIcon #include <Constants.au3> #include <Array.Au3> #include <Process.au3> $INIFile = @ScriptDir & "\Menu.ini" If FileExists($INIFile) <> 1 Then MsgBox(0, "KQM Error", "Unable to find MENU.INI File") Exit EndIf Opt("TrayMenuMode", 1); Default tray menu items (Script Paused/Exit) will not be shown. $FirstClass = IniReadSectionNames($INIFile) if IsArray($FirstClass) Then Dim $Menu[$FirstClass[0]+1] Dim $MenuItems[200] For $X = 1 To $FirstClass[0] $Menu[$X] = TrayCreateMenu($FirstClass[$X]) $SecundCalss = IniReadSection($INIFile, $FirstClass[$X]) IF IsArray($SecundCalss) Then For $Y = 1 To $SecundCalss[0][0] $MenuItems[TrayCreateItem($SecundCalss[$Y][0], $Menu[$X])] = $SecundCalss[$Y][1] Next EndIf Next TrayCreateItem("") $Config = TrayCreateItem("Config") $About = TrayCreateItem("About") $exititem = TrayCreateItem("Exit") TraySetState() TrayTip ( "KQM", "The Quick Menu is Running Just Click on Me",3,1) Else Run(@ScriptDir & "\KQMConfig.EXE") Exit EndIf While 1 $msg = TrayGetMsg() Select Case $msg < 1 ContinueLoop Case $msg = $exititem ExitLoop Case $msg = $About MsgBox(0,"KQM About","This Is Krikov Quick Menu"&@CRLF&"Created By Krikov AutoMan 2008") Case $msg = $Config Run("KQMConfig.EXE") Case Else $Command = $MenuItems[$msg] IF StringInStr($Command,".exe") or StringInStr($Command,".com") or StringInStr($Command,".bat") Then if FileExists($Command) = 1 Then Run($Command) EndIf Else if FileExists($Command) = 1 Then ShellExecute($Command) Else PathCheck() EndIf EndIf EndSelect WEnd Func PathCheck() if StringLen($Command) < 1 Then Else TrayTip("KQM Error","The File :"&@CRLF&$Command&@CRLF&" Renamed or Removed",5,3) EndIf EndFunc The Menu Configurator #include <GUIConstants.au3> #Include <GuiListBox.au3> #include <Array.au3> Opt("OnExitFunc", "endscript") $Form1_1 = GUICreate("Krikov Quick Menu Creator", 633, 346, 193, 124) $Label1 = GUICtrlCreateLabel("Add Root Menu", 48, 32, 79, 17) $RootInput = GUICtrlCreateInput("", 16, 56, 137, 21) $SubList = GUICtrlCreateList("", 160, 136, 145, 149) $RootMenuAdd = GUICtrlCreateButton("Add", 16, 80, 139, 25, 0) $RootList = GUICtrlCreateList("", 16, 136, 137, 149) $CMDInput = GUICtrlCreateInput("", 16, 288, 609, 21) $Browse = GUICtrlCreateButton("Browse...", 16, 312, 75, 25, 0) $Apply = GUICtrlCreateButton("Apply", 96, 312, 75, 25, 0) $SubInput = GUICtrlCreateInput("", 160, 56, 145, 21) $SubMenuAdd = GUICtrlCreateButton("Add", 160, 80, 147, 25, 0) $Label2 = GUICtrlCreateLabel("Add SubMenu", 192, 32, 72, 17) $DelRoot = GUICtrlCreateButton("Delete", 16, 109, 139, 25, 0) $DelSub = GUICtrlCreateButton("Delete", 160, 109, 147, 25, 0) $Pic1 = GUICtrlCreatePic("Logo.Jpg", 320, 64, 289, 193, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS)) GUICtrlSetState($Apply,$GUI_DISABLE) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### $INI = @ScriptDir&"\Menu.ini" $RootMenu = IniReadSectionNames($INI) RootRefresh() While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $RootList; Get Content of SubMenu By Select a Root Menu CleanInput() SubRefresh() Case $SubList; Get The Command Value By Select A Sub List CleanInput() $CommandValue = IniRead($INI,GUICtrlRead($RootList),GUICtrlRead($SubList)," ") GUICtrlSetData($CMDInput,$CommandValue,"") Case $RootMenuAdd; Add a Section to Root List FileWriteLine($INI,"["&GUICtrlRead($RootInput)&"]") RootRefresh() CleanInput() Case $SubMenuAdd; Add a Key for Submenu IniWrite($INI,GUICtrlRead($RootList),GUICtrlRead($SubInput),GUICtrlRead($CMDInput)) SubRefresh() CleanInput() Case $Browse; Browse For Files $CMD = FileOpenDialog("Please Select File Or Folder",GUICtrlRead($CMDInput),"All (*.*)") IF $CMD <> "" Then GUICtrlSetData($CMDInput,$CMD) GUICtrlSetState($Apply,$GUI_ENABLE) EndIf Case $Apply; Commit The Command to a Sub Key IniWrite($INI,GUICtrlRead($RootList),GUICtrlRead($SubList),GUICtrlRead($CMDInput)) GUICtrlSetState($Apply,$GUI_DISABLE) MsgBox(0,"KQM","Data Commited to Menu") Case $DelSub; Delete One Sub Key IniDelete($INI,GUICtrlRead($RootList),GUICtrlRead($SubList)) GUICtrlSetData($CMDInput,"") SubRefresh() Case $DelRoot; Delete Root Menu If Not IsDeclared("iMsgBoxAnswer") Then Local $iMsgBoxAnswer $iMsgBoxAnswer = MsgBox(292,"KQM","Continue To Delete "&GUICtrlRead($RootList)&" Menu ???") CleanInput() Select Case $iMsgBoxAnswer = 6;Yes IniDelete($INI,GUICtrlRead($RootList)) _GUICtrlListBox_ResetContent($SubList) RootRefresh() Case $iMsgBoxAnswer = 7;No EndSelect EndSwitch WEnd Func RootRefresh() _GUICtrlListBox_ResetContent($RootList) $RootMenu = IniReadSectionNames($INI) if IsArray($RootMenu) Then For $X = 1 to $RootMenu[0] GUICtrlSetData($RootList,$RootMenu[$X]) Next EndIf EndFunc Func SubRefresh() _GUICtrlListBox_ResetContent($SubList) $SubMenu = IniReadSection($INI,GUICtrlRead($RootList)) IF IsArray($SubMenu) Then For $Y = 1 to $SubMenu[0][0] GUICtrlSetData($SubList,$SubMenu[$Y][0]) Next EndIf EndFunc Func CleanInput() GUICtrlSetData($RootInput,"") GUICtrlSetData($SubInput,"") GUICtrlSetData($CMDInput,"") EndFunc Func endscript() If ProcessExists("KQM.EXE") Then ProcessClose("KQM.EXE") EndIf if FileExists($INI) Then Run("KQM.EXE") EndIf EndFunc Krikov The AutoMAN
  19. i notice that this is the main line Dim $Menu[$FirstClass[0]+1] but how can i get the value if the selection Krikov
  20. Thanks Jos but can you give me an example for that Krikov
  21. This is the Menu.ini File Content [Utils] Util1 = Util2 = [Test] Test1 = Test2 = Test3 = [Help] Help1 = Help2 = Help3 = [Document] File1 = File2 = File3 =
  22. i am try to write an Generic Tray Menu By Read an ini file #Include <Constants.au3> #include <Array.Au3> #NoTrayIcon $INIFile = "Menu.ini" IF FileExists($INIFile) <> 1 Then MsgBox(0,"KQM Error","Unable to find MENU.INI File") Exit EndIf Opt("TrayMenuMode",1) ; Default tray menu items (Script Paused/Exit) will not be shown. $FirstClass = IniReadSectionNames($INIFile) For $X = 1 to $FirstClass[0] $MenuX = TrayCreateMenu($FirstClass[$X]) $SecundCalss = IniReadSection($INIFile,$FirstClass[$X]) For $Y = 1 to $SecundCalss[0][0] TrayCreateItem('"'&$SecundCalss[$Y][0]&'"',$FirstClass[$X]) Next Next $exititem = TrayCreateItem("Exit") TraySetState() While 1 $msg = TrayGetMsg() Select Case $msg = 0 ContinueLoop Case $msg = $exititem ExitLoop EndSelect WEnd Exit Krikov
  23. Hello, I Want to Read An ini file With The iniread Function and That any of Key under Each Section will Converted to Varaiable so i can Call it to run Somthing Just like id write $Var = "File Path" is that posibale ? Krikov
  24. Hello, There is any way to run pure autoit code under ASP Web Page ? if there is a way i'd like to see an example Thanks AutoMan
  25. Hello, There is any way to Hide or Disable one Tab and Keep All other tabs working ? Krikov
×
×
  • Create New...