Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/16/2014 in all areas

  1. rindeal, I think this sums you up quite nicely - especially after our PM exchange earlier today. M23
    2 points
  2. AutoIt is just in between the cathedral and the bazaar. Take or leave.
    1 point
  3. I'll continue to add Headers to some of my own functions for the simple reason that I continually need to refer to complex information while I am coding and I frequently dump everything into a single file. Some functions don't need as much detail so I just use comments. [ ; Return the 1st Inversion of a binary string variant, scale modulation Func _ModeInversion($sBin) Return StringRegExpReplace($sBin, "(0*1)(.*)", "$2$1") EndFunc ; If I had to write out full header information for every one liner, It would drive me mad. Maintenance of the bundled UDF libraries is another question altogether. I believe it's a quetion of inventing the right portable syntax, which also doesn't interfere with 3rd party software. That may or may not be complicated depending on the software specs.
    1 point
  4. Melba23

    _ArrayShuffle

    czardas, Re-reading the thread I suddenly wondered if you had misunderstood the code. No harm done. M23
    1 point
  5. iamtheky

    VPN_tool

    I'm always amazed at how the simplest scripts become the most useful, or most used. If you have folk who VPN and have to traverse machines, you should build them one of these. Its way too easy, and they will want to service you right there in the office. Some basic examples of mapping a drive, file transfer, RDP, and bringing up a device in the browser are provided. It tries to connect the VPN (via the Cisco VPN client) on execution (line 37)...so you will want to fill out the commands with proper IPs and credentials first. We are all old in my shop so SkellySouls classic Steam flavored GUI gave it some extra weight. #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <Array.au3> HotKeySet("{ESC}", "_Exit") $Width = 500 $Height = 205 Global $ButtonGetAW , $ButtonPutAW , $ButtonGetNAS , $ButtonPutNAS , $ButtonRDPAlien , $ButtonNASGUI _Steam("SOC TOOL - " & @ComputerName, $Width, $Height, Default, Default) While 1 Sleep(1000) WEnd Func _Steam($sTitle, $sWidth, $sHeight, $sX, $sY) ;;; Steam Window Start ;;; $Steam_Win = GUICreate($sTitle, $sWidth, $sHeight, $sX, $sY , $WS_POPUP, $WS_EX_TOOLWINDOW) GUISetFont(8, 600, 0, "Tahoma") GUISetBkColor(0x464646) ;;; Steam Window End ;;; ;;; Steam Title Bar Start ;;; $Bar = GUICtrlCreateLabel($sTitle , 0 , 0 , $sWidth - 20, 20 , $SS_NOTIFY , $GUI_WS_EX_PARENTDRAG) GUICtrlSetFont($Bar, 10, 600, 0, "Tahoma") ; Bold GUICtrlSetColor($Bar , 0xD8DED3) GUICtrlSetBkColor($Bar , 0x5A6A50) ;;; Steam Title Bar End ;;; ;;; Steam Title Exit Start ;;; $Exit = GUICtrlCreateLabel("X" , $sWidth - 20 , 0 , 20 , 20 , $SS_CENTER) GUICtrlSetFont($Exit, 10, 800, 0, "Tahoma") ; Bold GUICtrlSetColor($Exit , 0xD8DED3) GUICtrlSetBkColor($Exit, 0x5A6A50) ;;; Steam Title Exit End ;;; _Steam_Extension($Width, $Height) ; Create Full GUI GUISetState(@SW_SHOW) runwait('cmd /c ' & '"' & 'C:\program files (x86)\Cisco Systems\VPN Client\vpnclient.exe' & '"' & ' connect CONNECTIONNAME user USERNAME pwd PASSWORD') While 1 $Msg = GUIGetMsg() Switch $Msg Case $Exit runwait('cmd /c ' & '"' & 'C:\program files (x86)\Cisco Systems\VPN Client\vpnclient.exe' & '"' & ' disconnect') Exit Case $ButtonPutAW _Copy2Alien() Case $ButtonGetAW _Alien2me() Case $ButtonPutNAS _CopytoNAS() Case $ButtonGetNAS _NAStoMe() Case $ButtonRDPAlien _RDPalien() Case $ButtonNASGUI _NASGUI() EndSwitch WEnd EndFunc Func _Steam_Extension($eWidth, $eHeight) $Steam_Arm_X = 200 ; This adjusts the Arms Width $Steam_Arm_Y = 20 ; This really shouldn't be played with... ;;; Steam Arm Start ;;; $Arm = GUICtrlCreateGraphic($Steam_Arm_X, $Steam_Arm_Y, $eWidth - $Steam_Arm_X, $eHeight - $Steam_Arm_Y) GUICtrlSetBkColor($Arm, 0x494E48) GUICtrlSetState($Arm, $GUI_DISABLE) ;;; Steam Arm End ;;; ;;; Steam Test Buttons ;;; $ButtonPutAW = GUICtrlCreateButton("Copy2Alien", 10, 30, $Steam_Arm_X - $Steam_Arm_Y, 20) $ButtonGetAW = GUICtrlCreateButton("Alien2me", 10, 60, $Steam_Arm_X - $Steam_Arm_Y, 20) $ButtonPutNAS = GUICtrlCreateButton("CopyToNAS", 10, 90, $Steam_Arm_X - $Steam_Arm_Y, 20) $ButtonGetNAS = GUICtrlCreateButton("NAStoMe", 10, 120, $Steam_Arm_X - $Steam_Arm_Y, 20) $ButtonNASGUI = GUICtrlCreateButton("NAS GUI", 10, 150, $Steam_Arm_X - $Steam_Arm_Y, 20) $ButtonRDPAlien = GUICtrlCreateButton("rdp2alien", 10, 180, $Steam_Arm_X - $Steam_Arm_Y, 20) ;;; Steam Test Buttons ;;; ;;; Steam Border Start ;;; $Border = GUICtrlCreateGraphic($Steam_Arm_X + 10, 30, $eWidth - $Steam_Arm_X - $Steam_Arm_Y, $eHeight - $Steam_Arm_Y - $Steam_Arm_Y) $Header = GUICtrlCreateGraphic($Steam_Arm_X + 10, 30, $eWidth - $Steam_Arm_X - $Steam_Arm_Y, 20) GUICtrlSetColor($Border, 0x696A65) GUICtrlSetColor($Header, 0x696A65) GUICtrlSetState($Border, $GUI_DISABLE) GUICtrlSetState($Header, $GUI_DISABLE) ;;; Steam Border End ;;; ;;; Steam Sample Text Start ;;; $Text = GUICtrlCreateLabel("Maybe an info area?", 220, 35, 200, 20) GUICtrlSetColor($Text, 0xC3B54C) GUICtrlSetBkColor($Text, $GUI_BKCOLOR_TRANSPARENT) ;;; Steam Sample Text End ;;; ;;; Steam Sample Control ;;; GUICtrlCreateEdit("This is a placeholder." , 223, 60, 255, 118) ;;; 220x60 is where controls should start. ;;; Steam Sample Control ;;; EndFunc Func _Exit() Exit EndFunc Func _Alien2me() $file = FileOpenDialog("Alien2me" , "\\172.16.10.11\images" , "ALL (*.*)" , 1) $afile = StringSplit($file , "\") Runwait ("cmd /c xcopy " & '"' & $file & '"' & " " & '"' & @ScriptDir & "\" & $afile[$afile[0]] & '"' & "* /Y") EndFunc Func _Copy2Alien() $file = FileOpenDialog("Copy2Alien" , @ScriptDir , "ALL (*.*)" , 1) $afile = StringSplit($file , "\") Runwait ("cmd /c xcopy " & '"' & $file & '"' & " " & '"' & "\\172.16.70.111\images\" & $afile[$afile[0]] & '"' & "* /Y") EndFunc Func _CopytoNAS() runwait("net use Z: \\172.16.10.8\Public\SHARE\Tools PASSWORD /user:admin") $file = FileOpenDialog("toNAS" , @ScriptDir , "ALL (*.*)" , 1) $afile = StringSplit($file , "\") Runwait ("cmd /c xcopy " & '"' & $file & '"' & " " & '"' & "z:\" & $afile[$afile[0]] & '"' & "* /Y") EndFunc Func _NAStoMe() runwait("net use Z: \\172.16.10.8\Public\SHARE\Tools PASSWORD /user:admin") $file = FileOpenDialog("NAS2me" , "Z:\" , "ALL (*.*)" , 1) $afile = StringSplit($file , "\") Runwait ("cmd /c xcopy " & '"' & $file & '"' & " " & '"' & @ScriptDir & "\" & $afile[$afile[0]] & '"' & "* /Y") EndFunc Func _RDPalien() runwait("mstsc /v:172.16.10.11") EndFunc Func _NASGUI() shellexecute("http://172.16.10.8") EndFunc
    1 point
  6. This UDF won't work with the latest version of AutoIt, the GUIToolTip UDF that this is based off of has been extensively rewritten and the function calls in this udf are all written wrong for it. BTW, you probably don't need this any longer as the rewrite made using the GUIToolTip UDF a hell of a lot easier than it was.
    1 point
  7. Do you realize the distance that light travelled since the last post in this thread? You're lost somewhere between Luhman 16 and Wolf 359.
    1 point
  8. martin

    Serial Port /COM Port UDF

    Apologies for the delay. The link on the first page of this thread will get dll version 2.82 which allows for data bits 4,5,6,7 and 8. Previously I had only allowed for 7 or 8 data bits, I suppose because that's all I've ever used. martin
    1 point
  9. rcmaehl

    AutoIt Snippets

    Wouldn't Switch $sCountry work better than all those If statements?
    1 point
×
×
  • Create New...