Jump to content



Photo

AutoIt Snippets


  • Please log in to reply
194 replies to this topic

#181 guinness

guinness

    all-consuming swarm in inconspicuous disguise

  • Developers
  • 18,133 posts

Posted 14 October 2014 - 01:42 PM

What on earth?... I do not understand any of that code at all. What are the benefits to all that code over the code I wrote?

I can have multiple instances of the average mean during code execution, whereas your version is only for one. If I want a second instance with your version, then I have to destroy the previous first. Also I am just adding the values together and keeping note of the times the Add() function has been called. No need to store in an array, which is not only a memory hog but less efficient as you ReDim everytime an element is added. Which in the backend creates an new array and copies the old elements across.


Example List: _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()CodingDirToHTML5FileInstallrGeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...
Updated: 12/01/2015








#182 Morthawt

Morthawt

    aka TutsTeach

  • Active Members
  • PipPipPipPipPipPip
  • 650 posts

Posted 14 October 2014 - 02:26 PM

Well it is the only method I know that I can perform the average with the least amount of code. You have all kinds of things in yours that I don't have a hope of understanding. Including that GUID looking string. You are a developer of AutoIt so I would imagine you know it inside and out, I am not that advanced with the language. I can do a lot and it is rare for me to have an idea and not be able to make something but I ackknowledge there is still a lot to AutoIt that I would likely never get into either because the excess required knowledge per particular usage would be too high, like certain windows API things and WMI etc. But what you wrote in your example is alien to me. lol


Edited by Morthawt, 14 October 2014 - 02:27 PM.


#183 Bluesmaster

Bluesmaster

    Adventurer

  • Active Members
  • PipPip
  • 142 posts

Posted 26 October 2014 - 06:27 PM

just a small one-liner contribution that came along today. Calculates the weekday based on another weekday and the diffrence in  days between them:

(I know you can do it by combining udfs but hey.. geek.gif if you get very very bored you can reverse engineer the math :) )

Mod( Mod( @WDAY + 7 + Mod( $diff , 7 ) , 7 ) + 6 , 7 ) + 1

best regards 

 

Bluesmaster

 

 

 

*Update: there is a much shorter way to do this  (thanks to jchd)

$sourceDay = @WDAY $diff =  22  ; = 22 days in the future ConsoleWrite(   Mod($sourceDay + Mod($diff, 7) + 6, 7) + 1    & @LF)

Edited by Bluesmaster, 30 October 2014 - 05:08 PM.


#184 JLogan3o13

JLogan3o13

    115 and holding

  • MVPs
  • 4,785 posts

Posted 27 October 2014 - 01:14 PM

Bluesmaster, while you explain your approach, the undeclared variable in your snippet may throw newer forum members. It is generally regarded as best practice to include completely runnable code, even for one or two-liners. That way, new folks passing by can take your code and run it, learning from it.

 

 

Edit: Just saw your post in Examples where jchd corrects your methodology. You may want to update your snippet.


Edited by JLogan3o13, 27 October 2014 - 01:37 PM.

Dealing with end users: "Every day I play hide-and-seek with Stupid. Usually it finds me."

 

My Scripts: SCCM UDFInclude Source with Compiled Script, Disk Maintenance for Windows XP, "Deal-A-Day" Sites, Windows Firewall UDF


#185 Bluesmaster

Bluesmaster

    Adventurer

  • Active Members
  • PipPip
  • 142 posts

Posted 30 October 2014 - 05:09 PM

update:

 

- runable

- new methodology



#186 gil900

gil900

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 938 posts

Posted 19 January 2015 - 02:45 PM

I'm betting this is the smallest function and the simplest here

Global $aArray[10000000] MsgBox(0,'','') ; This take 43MB memory CleanVar($aArray) ; Now if we want to clean the var, we use this MsgBox(0,'','') ; Now it take about 4MB memory ; #FUNCTION# ==================================================================================================================== ; Name ..........: CleanVar ; Description ...: Instead of using the ugly method - $var = '' in order to clean variable, you can use CleanVar($var) ; Syntax ........: CleanVar(Byref $var) ; Parameters ....: $var                 - [in/out] The variable to clean. ; Return values .: None ; Author ........: gil900 ; Example .......: Yes ; =============================================================================================================================== Func CleanVar(ByRef $var)     $var = '' EndFunc

Edited by gil900, 19 January 2015 - 02:46 PM.

Please correct my English in this post. I want to learn how to write correctly in English


#187 guinness

guinness

    all-consuming swarm in inconspicuous disguise

  • Developers
  • 18,133 posts

Posted 19 January 2015 - 02:50 PM

I'm betting this is the smallest function and the simplest here

Global $aArray[10000000] MsgBox(0,'','') ; This take 43MB memory CleanVar($aArray) ; Now if we want to clean the var, we use this MsgBox(0,'','') ; Now it take about 4MB memory ; #FUNCTION# ==================================================================================================================== ; Name ..........: CleanVar ; Description ...: Instead of using the ugly method - $var = '' in order to clean variable, you can use CleanVar($var) ; Syntax ........: CleanVar(Byref $var) ; Parameters ....: $var                 - [in/out] The variable to clean. ; Return values .: None ; Author ........: gil900 ; Example .......: Yes ; =============================================================================================================================== Func CleanVar(ByRef $var)     $var = '' EndFunc

...and the worst snippet too. Please put a little more effort into your snippets. Even something like this makes more sense e.g.
AutoIt         
#include <Array.au3> Example() Func Example()     Local $aArray[100]     _ArrayDisplay($aArray)     PurgeVar($aArray)     _ArrayDisplay($aArray) EndFunc   ;==>Example Func PurgeVar(ByRef $vVar)     Switch VarGetType($vVar)         Case "Array"             Local $aEmpty[0]             $vVar = $aEmpty ; Default value of an array.         Case "Binary"             $vVar = Binary(0) ; Default value of binary.         Case "Bool"             $vVar = False ; Default value of a boolean.         Case "Double"             $vVar = 0.0 ; Default value of a double.         Case "Int32", "Int64"             $vVar = 0 ; Default value of an integer.         Case "Function", "Keyword", "DLLStruct", "Object", "Ptr"             $vVar = Null ; Default value of an object/pointer.         Case "String"             $vVar = "" ; Default value of a string.     EndSwitch EndFunc   ;==>PurgeVar

Edited by guinness, 19 January 2015 - 07:28 PM.

Example List: _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()CodingDirToHTML5FileInstallrGeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...
Updated: 12/01/2015


#188 gil900

gil900

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 938 posts

Posted 19 January 2015 - 03:07 PM

What is the point to check this (VarGetType) if you anyway use it to delete the data in variable?

It really matter if you use 0 or "" when the goal is to clear memory that the variable use?

"" and 0 Cleaning almost the same amount of memory and from what you said, "" use less memory so it cleaning a bit more memory.

 

 

 

...and the worst snippet too.

Maybe :sweating:


Edited by gil900, 19 January 2015 - 03:19 PM.

Please correct my English in this post. I want to learn how to write correctly in English


#189 JohnOne

JohnOne

    Number #1

  • Active Members
  • PipPipPipPipPipPip
  • 14,275 posts

Posted 19 January 2015 - 03:35 PM

Probably would not work on an array either.


AutoIt Absolute Beginners      Require a serial      Pause Script
 
 
Monkey's are, like, natures humans.


#190 guinness

guinness

    all-consuming swarm in inconspicuous disguise

  • Developers
  • 18,133 posts

Posted 19 January 2015 - 03:58 PM

What is the point to check this (VarGetType) if you anyway use it to delete the data in variable?

It really matter if you use 0 or "" when the goal is to clear memory that the variable use?

"" and 0 Cleaning almost the same amount of memory and from what you said, "" use less memory so it cleaning a bit more memory.

 

 

Maybe :sweating:

Because good practice would be to "clear" with the datatype the variable is holding. Mine isn't fully working snippet. Just a idea.

 

JohnOne,

 

VarGetType does work with arrays,


Example List: _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()CodingDirToHTML5FileInstallrGeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...
Updated: 12/01/2015


#191 JohnOne

JohnOne

    Number #1

  • Active Members
  • PipPipPipPipPipPip
  • 14,275 posts

Posted 19 January 2015 - 06:44 PM

Yeah, sorry I thought your code was complete.


AutoIt Absolute Beginners      Require a serial      Pause Script
 
 
Monkey's are, like, natures humans.


#192 guinness

guinness

    all-consuming swarm in inconspicuous disguise

  • Developers
  • 18,133 posts

Posted 19 January 2015 - 07:28 PM

Yeah, sorry I thought your code was complete.

Now it is.

Example List: _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()CodingDirToHTML5FileInstallrGeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...
Updated: 12/01/2015


#193 JohnOne

JohnOne

    Number #1

  • Active Members
  • PipPipPipPipPipPip
  • 14,275 posts

Posted 19 January 2015 - 11:47 PM

Not sure it is, I'm not 100% but I don't think you can pass type Object ByRef...

AutoIt         
$obj = ObjCreate("scripting.dictionary") _Check($obj) PurgeVar($obj) _Check($obj) Func PurgeVar(ByRef $vVar)     Switch VarGetType($vVar)         Case "Array"             Local $aEmpty[0]             $vVar = $aEmpty ; Default value of an array.         Case "Binary"             $vVar = Binary(0) ; Default value of binary.         Case "Bool"             $vVar = False ; Default value of a boolean.         Case "Double"             $vVar = 0.0 ; Default value of a double.         Case "Int32", "Int64"             $vVar = 0 ; Default value of an integer.         Case "Function", "Keyword", "DLLStruct", "Object", "Ptr"             $vVar = Null ; Default value of an object/pointer.         Case "String"             $vVar = "" ; Default value of a string.     EndSwitch EndFunc   ;==>PurgeVar Func _Check($obj)     Static $num = 0     $num += 1     ConsoleWrite($num & " " & VarGetType($obj) & @LF)     If Not IsObj($obj) Then         Exit MsgBox(0, "Error:" & " " & $num, VarGetType($obj) & @CRLF & $obj)     EndIf EndFunc   ;==>_Check

Oddly though, it does convert it to the Keyword.

 

EDIT: So Is Null, really Null, or Just a Keyword, and does AutoIt need it's types updating?


Edited by JohnOne, 19 January 2015 - 11:52 PM.

AutoIt Absolute Beginners      Require a serial      Pause Script
 
 
Monkey's are, like, natures humans.


#194 guinness

guinness

    all-consuming swarm in inconspicuous disguise

  • Developers
  • 18,133 posts

Posted 20 January 2015 - 04:43 AM

Null is just a keyword. I used it here because in C# dedault(object) is null.

Example List: _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()CodingDirToHTML5FileInstallrGeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...
Updated: 12/01/2015


#195 Morthawt

Morthawt

    aka TutsTeach

  • Active Members
  • PipPipPipPipPipPip
  • 650 posts

Posted 24 March 2015 - 05:49 PM

When you're working in a vmware system that does not have VMTools installed and you want to paste text from your system to the virtual system, you can use this script snippet to ghetto rig paste from your clipboard into the VM system using the send function:

#RequireAdmin AutoItSetOption('TrayAutoPause', 0) HotKeySet("^+v", 'Sender') While 1     Sleep(100) WEnd Func Sender()     Send(ClipGet()) EndFunc





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users