Jump to content

AutoIT script updater ??


Recommended Posts

G'day all

I've run into this so many times over the years where I find a script/UDF that looks like exactly what I want but it doesn't work on the latest version of AutoIT. So I spend ages working on it to bring it up-to-date only to find it doesn't live up to expectations. :D

http://www.autoitscript.com/autoit3/docs/script_breaking_changes.htm

So has anyone thought about/working on/Made a script updater for AutoIT?

(Just to be clear I'm talking about a program that will update a script to be compatible with the current version of Autoit.)

(IE fix the script breaking changes so the scripts are UNbroken. ;))

I think it'd be a good project to work on that when working would help the community.

So if anyone has ventured down this road and has advice to offer I'd be happy to hear from them.

At the moment my (Preliminary) thinking is along the lines of multiple cycles of the following

1. Any simple search and replaces using regex

(@InetGetActive - Calling the new InetGetInfo() function with no parameters returns a count of active downloads)

_GUICtrlXXXYYY() have been renamed _GUICtrlXXX_YYY() without any functional changes see UDF renaming

2. More complex script spanning changes

(InetGet("abort") - Calling the new InetClose() function with a handle returned from InetGet() will abort a download)

The script will have to recognise the variable used to capture the handle returned from InetGet() and replace InetGet("abort") with InetClose(handle).

3. THE REST

I'm thinking that any line containing a line that can't be converted by 1 & 2 is Marked for editing in SciTe

eg ;***SBC*** : {Line with changes}

or a system using Listview controls like "Application Translate Tool"

Anyway just thought I'd throw that out there and see if anyone has anything written that will do this or at least partly do it. IF not I’ll see what I can cook-up. J

I must admit the more I looked into this the more it scares me :) with the convoluted nature of the changes made.

But I think it would be worth it if a converter could be made. :D And it would give something back to the community.

Thanks for any and al help!

John Morrison

Link to comment
Share on other sites

  • 2 weeks later...

Ahhh well it looks like this isn't a big problem for anyone else.??

Seems a waste that all those old scripts will just fade and get lost.

I'll move on and see if there is anything else I can write to help the community.

Hope everyone is having a great weekend!

John Morrison

Link to comment
Share on other sites

I didn't want to say anything before as I'm not someone to put another person's ideas down, but the last 'major' script breaking changes happened back on 15th January, 2010 - v3.3.4.0. I know there have been script breaking changes afterwards but these were where the syntax totally changed to something different, though as you know 2 years in Internet time is very long and most by now should have updated their scripts. Good idea but not required. Sorry.

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_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: 22/04/2018

Link to comment
Share on other sites

Well it wasn't that long ago I was searching through for a script to perform a certain task.

I found one that did exactly what I wanted (well almost) but it did have a LOT of GUI commands that didn't work.

I had to manually go through find the new commands then replace all of the old ones. THEN the script didn't do what it was written up to do.

It would have been great to have a script do the update and save me all that time.

V3.3.8.0 December 2011 - Also brought in some minor script changes and as you know the minor changes/bugs are the hardest to find and fix especially if it isn't your code. ;)

When you say "most by now should have updated their scripts" that is of course assuming the script writer is still around to update their script or interested.

However, I always look at the long view.

The snippets that are being added to the Wiki right now (and in the future)... who will update them if/when script breaking changes are added?

I suppose it will be a matter of just waiting for someone to report the faulty script and then fix it.

Anyway as I didn't get any replies I already concluded that no one was interested.

But it still seems like a waste that everything written before Jan 2010 is to be ignored...shrug

Well one good thing.... I don't have to spend time writing the updater.

Link to comment
Share on other sites

I think there is more changes coming soon from what ive been reading in the developer thread, i dont understand a tenth of it

so you could be in the same situation again in a cple of months maybe

What about a compromise

If your desperate to write one do it to update just the basic ones or the simple ones so it takes some load of what you need to change and maybe make it highlight the others so you know where to look?

Just an idea (doesn't mean its good)

C

edit actually the highlight might not be a bad idea on its own as i never know what to change sometimes on old code

You could make it show the errors and links to other parts etc

Edited by Chimaera
Link to comment
Share on other sites

V3.3.8.0 December 2011 - Also brought in some minor script changes and as you know the minor changes/bugs are the hardest to find and fix especially if it isn't your code

Yeh, but I thought the updater was purely for syntax changes only, those were aimed mostly at returning values and 64-bit support.

When you say "most by now should have updated their scripts" that is of course assuming the script writer is still around to update their script or interested.

Correct, but honestly I haven't come across code I've need that hasn't worked with the latest AutoIt, though I know code is floating around the Forum.

The snippets that are being added to the Wiki right now (and in the future)... who will update them if/when script breaking changes are added?

Chimaera? Lets see what happens as one things for sure the language will live on.

Anyway as I didn't get any replies I already concluded that no one was interested.

You know how people work, they like to see answers first and then answer questions second. I think you would've seen better results if you had posted this in the Examples section with a snippet to show your idea.

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_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: 22/04/2018

Link to comment
Share on other sites

I think there is more changes coming soon from what ive been reading in the developer thread, i dont understand a tenth of it

so you could be in the same situation again in a cple of months maybe

I knew there would be changes. With a language like this where it's alive and developeing there will always be changes. ;)

What about a compromise

If your desperate to write one do it to update just the basic ones or the simple ones so it takes some load of what you need to change and maybe make it highlight the others so you know where to look?

Just an idea (doesn't mean its good)

I'm not desperate this was one I was going to put on the back burner and tinker with when time permitted.

Yep Step/Pass 1 would be the start (the easy stuff) (ie All the GUI changes)

Step2/3 could just be commenting the lines with "possible" script breaks.

If the system were a rules based system then as time goes by it could be easily added to.

With a rules based system it could even put in several lines of instructions on how to fix it. :)

Anyway it's all vapourware at the moment and there doesnt' seem to be enough interest to warrent any development.

edit actually the highlight might not be a bad idea on its own as i never know what to change sometimes on old code

You could make it show the errors and links to other parts etc

That is the main thing I find when updating scripts. (Press F5 - Go through the errrors - repeat) Then when you get to the end there are no errors but it still doesn't work because there were return values changes or something.
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...