Sign in to follow this  
Followers 0
Jeff987

Drag/resize & button creation during runtime - help cleanup my script

4 posts in this topic

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Icon=..\..\..\..\Downloads\VNCmenu.ico
#AutoIt3Wrapper_Outfile=VncmenuGen.exe
#AutoIt3Wrapper_Outfile_x64=VncmenuGenx64.exe
#AutoIt3Wrapper_Compile_Both=y
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <EditConstants.au3>
#include <StaticConstants.au3>
#include <WinAPI.au3>
;#include <CtrlResizeMove.au3>
#include <Process.au3>
#include <File.au3>; _net_view
#include <Array.au3>; _net_view
;< ===== ========

Opt('MustDeclareVars', 1)
;GUIOnEventMode(1)
Dim $aLines[1], $host[1][5]
Local $linenum = 0, $line = "", $aItems, $datacount, $extended, $file, $f, $ii, $sStr,$tmp
Local $Button_1, $Button_2, $msg, $aCPos, $checkCN1, $checkCN2, $myedit, $Label1, $hWnd, $sTxt, $aCPos, $names, $b
Local $f = (@WorkingDir & "\netview.bat"), $fnetview = (@WorkingDir & "\netview.txt")
If FileExists($fnetview) Then
;do nothing
Else
If Not FileExists($f) Then _makenetview()
RunWait(@ComSpec & ' /c net view /all> ' & @WorkingDir & "\netview.txt", '', @SW_HIDE)
EndIf
Global $count = _FileCountLines(@WorkingDir & "\netview.txt")
Global $NetView[$count], $newButton =0
_Net_view()
_getData()
Example()
Func Example()
$hWnd = GUICreate("Hold down Ctrl or Alt & Drag control / Ctrl+S Save",(@DesktopWidth-100),(@DesktopHeight-100))
;ConsoleWrite($linenum & @CRLF)
;_ArrayDisplay($host)
$b = UBound($host, 0)
;ConsoleWrite($b & @CRLF)
For $i = 0 To UBound($host) - 1
  GUICtrlCreateButton($host[$i][0], $host[$i][1], $host[$i][2], $host[$i][3], $host[$i][4])
  ;GUICtrlSetData(-1,$host[$i][0])
Next
;$Button_1 = GUICtrlCreateButton("1", $host[1][1],$host[1][2],$host[1][3], $host[1][4])
;GUICtrlSetData($Button_1,$host[1][0])
;GUICtrlSetOnEvent(-1,"")
;$Button_2 = GUICtrlCreateButton("Button Test", 118, 14, 100, 30)
;$checkCN1 = GUICtrlCreateCheckbox("CHECKBOX 1", 12, 49, 98, 19)
;$checkCN2 = GUICtrlCreateCheckbox("CHECKBOX 2", 120, 49, 98, 19)
;GUICtrlCreateButton("", $host[1][1],$host[1][2],$host[1][3], $host[1][4])
;GUICtrlSetData($Button_1,$host[1][0])
;GUICtrlSetOnEvent(-1,"")
;$Button_2 = GUICtrlCreateButton("Button Test", 118, 14, 100, 30)
;$checkCN1 = GUICtrlCreateCheckbox("CHECKBOX 1", 12, 49, 98, 19)
;$checkCN2 = GUICtrlCreateCheckbox("CHECKBOX 2", 120, 49, 98, 19)
;$myedit = GUICtrlCreateEdit("First line" & @CRLF, 10, 73, 211, 54, $ES_AUTOVSCROLL + $WS_VSCROLL)
;$Label1 = GUICtrlCreateLabel("Line 1 Cell 1", 10, 150, 70, 20)
;GUICtrlCreateLabel("Line 2 Cell 1", 100, 150, 70, 20)
GUISetState()
; Run the GUI until the dialog is closed
While 1
  $msg = GUIGetMsg()
  Select
   Case $msg = $GUI_EVENT_CLOSE
    _FileWriteFromArray2D($file, $host);, 0, 0,",")
    ExitLoop
    ;Case $msg = $Button_1
    ;_ArrayDisplay($host)
    ;Case $msg = $Button_2
    ; ConsoleWrite($names & @CRLF)
    ;MsgBox(0, 'Testing', 'Button 2 was pressed')
  EndSelect
  Sleep(50)
  _CtrlResizeMove(); < ========= Inserted here (Remove when finished) ========
  _Update()
  ;_WinAPI_RedrawWindow($hWnd)
  ;If IsArray($aCPos) Then
  ;ConsoleWrite( "Name: "&$sTxt&" POS: L,T " & $aCPos[0] & "," & $aCPos[1] & " SIZE: W/H " & $aCPos[2] & "," & $aCPos[3] & @CRLF)
  ;EndIf
WEnd
EndFunc   ;==>Example
;
Func _Update()
Local $msg1, $Button, $Pos, $hWnd1, $ButtonNM, $index,$gh
$hWnd1 = WinGetHandle($hWnd)
$Button = GUICtrlRead($msg1)
$Pos = ControlGetPos($hWnd1, "", $Button)
$ButtonNM = ControlGetText("", "", $Button)
WinSetTitle($hWnd1, "", $ButtonNM & " POS:L,T " & $Pos[0] & "," & $Pos[1] & " SIZE:W/H " & $Pos[2] & "," & $Pos[3])
$index = _ArraySearch($host, $ButtonNM, 0, 0, 0, 0, 1, 0)
If $index = -1 Then
   if $newButton =1 Then
    ReDim $host[UBound($host,1)+1 ][5]
    $host[(UBound($host)-1)][0] = $ButtonNM
    $host[(UBound($host)-1)][1] = $Pos[0]
    $host[(UBound($host)-1)][2] = $Pos[1]
    $host[(UBound($host)-1)][3] = $Pos[2]
    $host[(UBound($host)-1)][4] = $Pos[3]
    $newButton=0
   EndIf
  Return
EndIf
$host[$index][0] = $ButtonNM
$host[$index][1] = $Pos[0]
$host[$index][2] = $Pos[1]
$host[$index][3] = $Pos[2]
$host[$index][4] = $Pos[3]
EndFunc   ;==>_Update
Func _getData()

$file = (@WorkingDir & "\host.csv")
$f = FileOpen($file, 0)
; Check if file opened for reading OK
If $f = -1 Then
  MsgBox(0, "Error", "Unable to open file. " & @CR & "Creating template" & @CR & "Use Name, left, top, width, height")
  $f = FileOpen($file, 2)
  If $f = -1 Then
   MsgBox(0, "Error", "Unable to open file.")
   Exit
  EndIf
  ;FileWrite($file, "CPU_Name,10,10,50,50")
  ;Run("notepad.exe " & $file)
  _makefile()
EndIf
;ConsoleWrite($file & @CRLF)
; Read in lines of text until the EOF is reached
While 1
  $line = FileReadLine($f)
  If @error = -1 Then ExitLoop
  ;ConsoleWrite($line & @CRLF)
  $linenum = $linenum + 1
  ;ConsoleWrite("Line read:"& $line&" :linenum= "&$linenum&@CRLF)
  $sStr = (StringStripWS($line, 8));StringStripCR
  ;ConsoleWrite($sStr & @CRLF)
  $aLines = StringSplit($sStr, ",", 2);; returns a 0 based array where assumably the first row contains the column names
  $datacount = UBound($aLines)
  ;ConsoleWrite($datacount & @CRLF)
  ;_ArrayDisplay($aLines)
  ReDim $host[$linenum][5]
  If IsArray($aLines) Then
   ;$aItems=StringRegExpReplace($aLines[0], ",", ",")
   ;$extended = @extended
   For $ii = 0 To 4
    $host[$linenum - 1][$ii] = $aLines[$ii]
   Next
  EndIf
  ;_ArrayDisplay($host)
WEnd
EndFunc   ;==>_getData
; make a netview.bat file
Func _makenetview()
FileWriteLine($f, "@echo off")
FileWriteLine($f, "for /f ""tokens=1""  %%i in ('net view') do (call :CheckName %%i)")
FileWriteLine($f, ":CheckName")
FileWriteLine($f, "Set TestVal=%1")
FileWriteLine($f, "If Not {%TestVal:~0,2%}=={\\} goto :EOF")
FileWriteLine($f, "Set TestVal=%TestVal:~2,15%")
FileWriteLine($f, "Set TestVal=%TestVal: =%")
FileWriteLine($f, "echo %TestVal%")
FileWriteLine($f, "goto :eof")
FileClose($f)
EndFunc   ;==>_makenetview
Func _net_view()

$file = FileOpen(@WorkingDir & "\netview.txt", 0)
; Check if file opened for reading OK
If $file = -1 Then
  MsgBox(0, "Error", "Unable to open file.")
  Exit
EndIf
For $i = 0 To $count
  $line = FileReadLine($file)
  If @error = -1 Then ExitLoop
  ;ConsoleWrite($i & " '" & $line & @LF)
  If StringInStr($line, "\\") <> 0 Then
   $NetView[$i] = _StringBetween1($line, "\\", " ")
  EndIf
Next
FileClose($file)
;FileDelete(@WorkingDir & "\netview.txt")
;_ArrayDisplay($NetView, "Computer Names")
EndFunc   ;==>_net_view
Func _makefile()
$file = (@WorkingDir & "\host.csv")
$f = FileOpen($file, 0)
Local $j, $l, $t
$l = 75
$t = 50
For $j = 0 To UBound($NetView) - 1
  If $NetView[$j] = "" Then
   ContinueLoop
  Else
   If $l >= 400 Then
    $l = 75
    $t = $t + 50
   EndIf
   FileWrite($file, $NetView[$j] & "," & $l & "," & $t & ",50,50")
  EndIf
Next
EndFunc   ;==>_makefile
Func _StringBetween1($s_String, $s_Start = 0, $s_End = 0)
$s_Start = StringInStr($s_String, $s_Start) + StringLen($s_Start)
Return StringMid($s_String, $s_Start, StringInStr($s_String, $s_End) - $s_Start)
EndFunc   ;==>_StringBetween1
;==========================================================================================================================================
; Function:   _FileWriteFromArray2D($FILEPATH, $ARRAY [, $iROWstart=0 [, $iROWend=0 [, $iCOLstart=0 [, $iCOLend=0 [, $DELIM='|']]]]])
;
; Description:    Write 1D/2D array to file, 2D with delimiter between every entry
;
; Parameter(s):  $FILEPATH - path/filename of the file to be write
;                  $ARRAY  - array to write from
;     optional   $iROWstart - start row-index, default 0
;     optional   $iROWend - end row-index, default Ubound(array)-1
;     optional   $iCOLstart - start column-index, default 0
;     optional   $iCOLend - end column-index, default Ubound(array,2)-1
;     optional   $DELIM  - delimiter for 2D-array entries, default '|'
;
; Requirement(s):   None
;
; Return Value(s):  On Success - Returns -1
;                  On Failure - Returns 0 and sets @error = 1 (given array is'nt array); @error = 2 (unable to open filepath)
;
; Note:    If $iROWstart > $iROWend or $iCOLstart > $iCOLend the values will be swapped among
;
; Author(s):        BugFix ( bugfix@autoit.de )
;==========================================================================================================================================
Func _FileWriteFromArray2D($FILEPATH, $ARRAY, $iROWstart=0, $iROWend=0, $iCOLstart=0, $iCOLend=0, $DELIM=',')
If Not IsArray($ARRAY) Then
  SetError(1)
  Return 0
EndIf
Local $Ubound = UBound($ARRAY)
If $iROWend = 0 Then $iROWend = $Ubound-1
Local $fh = FileOpen($FILEPATH, 2),$tmp
If $fh = -1 Then
  SetError(2)
  Return 0
EndIf
Select
Case $iROWstart < 0 Or $iROWstart > $Ubound-1
  $iROWstart = 0
  ContinueCase
Case $iROWend < 0 Or $iROWend > $Ubound-1
  $iROWend = $Ubound-1
  ContinueCase
Case $iROWstart > $iROWend
  $tmp = $iROWstart
  $iROWstart = $iROWend
  $iROWend = $tmp
EndSelect
Local $Ubound2nd = UBound($ARRAY, 2)
If @error = 2 Then
  For $i = $iROWstart To $iROWend
   FileWriteLine($fh, $ARRAY[$i])
  Next
Else
  If $iCOLend = 0 Then $iCOLend = $Ubound2nd-1
  Select
  Case $iCOLstart < 0 Or $iCOLstart > $Ubound2nd-1
   $iCOLstart = 0
   ContinueCase
  Case $iCOLend < 0 Or $iCOLend > $Ubound2nd-1
   $iCOLend = $Ubound2nd-1
   ContinueCase
  Case $iCOLstart > $iCOLend
   $tmp = $iCOLstart
   $iCOLstart = $iCOLend
   $iCOLend = $tmp
  EndSelect
  For $i = $iROWstart To $iROWend
   $tmp = ''
   For $k = $iCOLstart To $iCOLend
    If $k < $iCOLend Then
     $tmp &= $ARRAY[$i][$k] & $DELIM
    Else
     $tmp &= $ARRAY[$i][$k]
    EndIf
   Next
   FileWriteLine($fh, $tmp)
  Next
EndIf
FileClose($fh)
Return -1
EndFunc ;==>_FileWriteFromArray2D
;
;================= CtrlResizeMove.au3  ===========================
; REQUIREMENTS. There are two things you need to do to use script
; If this file is saved as "CtrlResizeMove.au3" then
; 1/ Add  #include "CtrlResizeMove.au3"  or #include "c:\full path\CtrlResizeMove.au3"
;      to top of your script in which you need to resize or move the controls.
; 2/ Put _CtrlResizeMove() within the loop of your script.
;
; HOW TO USE. While hovering over the GUI control you wish to alter:-
; 1/ Press Ctrl + Left mouse button to MOVE the control (And move the mouse);
; 2/ Press Alt + Left mouse button to RE- SIZE the control (And move the mouse);
; 3/ Press Ctrl + s to Save the new control parameters to a backup file called "'your_script_name' & BKn.au3"
;
; CLEANUP. When the control are as required:-
; 1/ Remove the inserted #include "CtrlResizeMove.au3" command
; 2/ Remove the inserted _CtrlResizeMove() command from within the loop of your script.
; 3/ Rename or remove backup files from your script's directory (folder).
;===================================================================
;
;#include <GUIConstantsEx.au3>
#include <Misc.au3>
Opt('MustDeclareVars', 1)
Local $scriptPath = @ScriptFullPath, $File, $Data,$bc=1, $newButton =0
Local $scriptPathNew = StringRegExpReplace($scriptPath, "(^.*)\.(.*)", "\1") & "BK" & _
        StringRegExpReplace($scriptPath, "^.*\.", ".$1")
;ConsoleWrite(@ScriptFullPath & @CRLF)
If FileExists($scriptPathNew) Then
    Local $Num = 0
    Do
        $Num += 1
        $scriptPathNew = StringRegExpReplace($scriptPath, "(^.*)\.(.*)", "\1") & "BK" & $Num & _
                StringRegExpReplace($scriptPath, "^.*\.", ".$1")
    Until Not FileExists($scriptPathNew)
EndIf
$Data = FileRead($scriptPath)
; This function to be called from within the loop of the script which has the GUI controls to be altered.
Func _CtrlResizeMove()
    Local $aCPos, $aMPos, $aMPosNew, $Num, $scriptPath, $hWnd, $aClssNmNN, $sTxt, $ClssNmNN, $iCommasNo, $Button,$Data,$bc
    Select
        Case (_IsPressed("11") Or _IsPressed("12")) And _IsPressed("01"); Ctrl + Left mouse button to move
            $hWnd = WinGetHandle(""); or Alt + Left mouse button to re-size
            Opt("MouseCoordMode", 2);1=absolute, 0=relative, 2=client
            $aMPos = MouseGetPos()
            $aClssNmNN = _CtrlGetByPos($hWnd, "", $aMPos[0], $aMPos[1], 0); uses client mouse coords
            Opt("MouseCoordMode", 1);1=absolute, 0=relative, 2=client
            $aMPos = MouseGetPos()
            If IsArray($aClssNmNN) Then $ClssNmNN = $aClssNmNN[1]
        ;ConsoleWrite("CLNN  " & $ClssNmNN & @CRLF)
            $aCPos = ControlGetPos($hWnd, "", $ClssNmNN)
            Do
                $aMPosNew = MouseGetPos()
                If _IsPressed("11") Then ControlMove($hWnd, "", $ClssNmNN, $aCPos[0] + $aMPosNew[0] - $aMPos[0], _
                        $aCPos[1] + $aMPosNew[1] - $aMPos[1])
                If _IsPressed("12") Then ControlMove($hWnd, "", $ClssNmNN, $aCPos[0], $aCPos[1], _
                        $aCPos[2] + $aMPosNew[0] - $aMPos[0], $aCPos[3] + $aMPosNew[1] - $aMPos[1])
                Sleep(100)
            Until Not _IsPressed("01")
        ;========== Updata Data ====================
            $sTxt = StringRegExpReplace(ControlGetText($hWnd, "", $ClssNmNN), "(\w*[ ]*)(\s*\v*)", "\1")
        ;ConsoleWrite($sTxt & @CRLF)
            $aCPos = ControlGetPos($hWnd, "", $ClssNmNN)
            $Data = StringRegExpReplace($Data, '("' & $sTxt & '".*),\h*\d*\h*,\h*\d*\h*,\h*\d*\h*,\h*\d*\h*(,.*|\))', _
                    '\1, ' & $aCPos[0] & ", " & $aCPos[1] & ", " & $aCPos[2] & ", " & $aCPos[3] & "\2")
        ;=========> End of Updata Data =============
  Case (_IsPressed("70")) ; F1 button to add button
   $Button=GUICtrlCreateButton("New Button "&$bc, 25, 25, 100, 30)
   GUICtrlSetData($Button,InputBox("Set Button Name",""))
   $newButton =1
   $bc=$bc+1
   GUICtrlSetState($Button,$GUI_FOCUS)
        Case _IsPressed("11") And _IsPressed("53"); Ctrl + s   To Save
            Do
            Until Not (_IsPressed("11") And _IsPressed("53"))
            $File = FileOpen($scriptPathNew, 2)
            FileWrite($File, $Data)
            FileClose($File)
            ShellExecute($scriptPathNew)
    EndSelect
EndFunc  ;==>_CtrlResizeMove
; From http://www.autoitscript.com/forum/index....=&showtopic=30717&view=findpos
Func _CtrlGetByPos($hWin, $sText = '', $iXPos = 0, $iYPos = 0, $iReturnType = 0)
    If IsString($hWin) Then $hWin = WinGetHandle($hWin)
    Local $sClassList = WinGetClassList($hWin), $hCtrlWnd
    Local $sSplitClass = StringSplit(StringTrimRight($sClassList, 1), @LF), $aReturn = ''
    For $iCount = UBound($sSplitClass) - 1 To 1 Step -1
        Local $nCount = 0
        While 1
            $nCount += 1
            Local $aCPos = ControlGetPos($hWin, $sText, $sSplitClass[$iCount] & $nCount)
            If @error Then ExitLoop
            If $iXPos >= $aCPos[0] And $iXPos <= ($aCPos[0] + $aCPos[2]) _
                    And $iYPos >= $aCPos[1] And $iYPos <= ($aCPos[1] + $aCPos[3]) Then
                If $sSplitClass[$iCount] <> '' And Not $iReturnType Then
                    Local $aClassNN[2] = [2, $sSplitClass[$iCount] & $nCount]
                    Return $aClassNN
                EndIf
                If $sSplitClass[$iCount] <> '' And $iReturnType = 3 Then
                    $hCtrlWnd = ControlGetHandle($hWin, $sText, $sSplitClass[$iCount] & $nCount)
                    ControlFocus($hWin, $sText, $hCtrlWnd)
                    $aReturn = DllCall('User32.dll', 'int', 'GetDlgCtrlID', 'hwnd', $hCtrlWnd)
                    If @error = 0 And $aReturn[0] <> '' Then
                        Local $aClassNN[4] = [4, $aReturn[0], $sSplitClass[$iCount] & $nCount, $hCtrlWnd]
                        Return $aClassNN
                    EndIf
                    Local $aClassNN[2] = [2, $sSplitClass[$iCount] & $nCount]
                    Return $aClassNN
                ElseIf $sSplitClass[$iCount] <> '' And $iReturnType = 2 Then
                    Return ControlGetHandle($hWin, $sText, $sSplitClass[$iCount] & $nCount)
                ElseIf $sSplitClass[$iCount] <> '' And $iReturnType = 1 Then
                    $hCtrlWnd = ControlGetHandle($hWin, $sText, $sSplitClass[$iCount] & $nCount)
                    ControlFocus($hWin, $sText, $hCtrlWnd)
                    $aReturn = DllCall('User32.dll', 'int', 'GetDlgCtrlID', 'hwnd', $hCtrlWnd)
                    If @error = 0 And $aReturn[0] <> '' Then
                        Local $aClassNN[2] = [2, $aReturn[0]]
                        Return $aClassNN
                    EndIf
                EndIf
                Return SetError(1, 0, 0)
            EndIf
        WEnd
    Next
    Return SetError(2, 0, 0)
EndFunc  ;==>_CtrlGetByPos
;
FileClose($file)
Exit

Here is what I am using to generate buttons that I read with another autoit app that I launch vnc using the button name as the host to connect to.

Can anyone clean this up so that it more useable, contains some error trapping, makes some sense to read.......

I need to mention that the cool guy(s) that wrote the _CtrlResizeMove() and the 2d array function stuff are what makes this possible.....

.... also this code is working so far for me....

So, this creates a file called host.csv at the working dir that contains the button names that the vnc calling app reads.

if host.csv doesn't exist, it will create one.

I added the non-stock includes to the file, cause I keep switching computers and seemed simpler to copy the one file back and forth...

holding ctrl button allows the buttons to be dragged with the mouse

holding alt button allows the buttons to be resized with the mouse

f1 adds a new button

button coordinates show in the title.

I would like to add a help menu, a delete button option, an edit button function.

Any good autoit guru's out there wanna take a look at this for me and try to clean this up a bit..... I think its very cool and can be used in many places other than what I'm trying to do with it..... I can make things work, but its awful to look at!

thanks

Jeff

Share this post


Link to post
Share on other sites



Should this be posted in another forum?

Share this post


Link to post
Share on other sites

I haven't run the code but just a couple of points to look at,_FileWriteFromArray() in the latest beta works with both 1D/2D Arrays. Secondly included files (e.g. #include <File.au3>) should be located at the top of the script and because the script is quite difficult to debug, I would start by working backwards and finding out the problem.


_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 04/09/2015

Share this post


Link to post
Share on other sites

You've got some awesome functions guiness!

I know my script is an abortion, but it does work.....

maybe someday someone will tackle making this look proper to a experienced code writer....

the idea is I get a list of computer names from netview,

I make buttons of the names.

these represent usually 50 to 100 computers.

This allows the buttons to be moved around to where the computers are in a building layout presentation

so the enduser can see the computer they are looking for.....

they click the button and vnc is launched opening a session to that computer.

Once I build the list and move the buttons to where I want them, they don't have to be moved again hardly ever.

but it makes my job during installation considerably easier for management of installation processes, and the end user benefits from it thereafter.

I saw that the _FileWriteFromArray() had changed, but for some reason it didnt work for me....

the udf was working for me...

thanks for looking!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0