Jump to content



Photo

How to convert GUI scripts to v3.2.12.0


  • Please log in to reply
69 replies to this topic

#41 monoceres

monoceres

    asdf

  • MVPs
  • 3,720 posts

Posted 30 May 2008 - 10:13 PM

I am thinking about adding the idea of monoceres into AutoIt3Wrapper and update a script one time when a directive is specified.
I took the original script/idea and created this UDF. Its somewhat faster but could you folfs give it a spin to see if it works as it should be?
Directive will be : #AutoIt3Wrapper_Fix_Includes=y
Which will be reset to "n"when ran to avoid running it each time.

*removed*

:)


Seems to work as expected :)
Insane speed btw! It's like 20x faster than mine!
:)
Posted ImageIs the link in my post broken? I do not longer own my domain, all the files are moved to my new domain.Example: http://monoceres.se/test.au3 -> http://andhen.mine.nu/monoceres.se/test.au3







#42 Jos

Jos

    oh joy ...

  • Developers
  • 21,071 posts

Posted 31 May 2008 - 09:44 AM

Seems to work as expected :)
Insane speed btw! It's like 20x faster than mine!
:)

Its the exact same logic as you used but just moved a couple of tests to a more logical place, used RegEx and only one "fileopen - write records - fileclose" to speed it up.
I think it makes live a lot easier for many when it runs one time adding the required *constands*.au3 files.

Jos :)

Edited by Jos, 31 May 2008 - 09:47 AM.

Visit the SciTE4AutoIt3 Download page for the latest versions                                                                 Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)


#43 gseller

gseller

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 1,057 posts

Posted 31 May 2008 - 06:33 PM

I just made a small "updater" which will search through your scripts and add appropriate includes.
Feel free to change it since it's not very optimized and it could have some problems (Tested on one of my old projects with 400+ lines and worked flawless though)

AutoIt         
#include <Array.au3> #include <File.au3> $script=FileOpenDialog("Choose script that will be fixed",@ScriptDir,"au3 (*.au3)") $autoitdir=FileSelectFolder("Autoit Include folder","") If $autoitdir="" Then Exit If $script="" Then Exit Global  $includelines, $scriptdata Global $includestoadd[1], $count=0 $scriptdata=FileRead($script) $includes=_FileListToArray($autoitdir,"*Constants*.au3") For $i=1 To Ubound($includes)-1     _FileReadToArray($autoitdir&"\"&$includes[$i],$includelines)     For $j=1 To Ubound($includelines)-1         If StringLeft($includelines[$j],12)="Global Const" Then             $const=StringMid($includelines[$j],StringInStr($includelines[$j],"$"),StringInStr($includelines[$j],'=')-StringInStr($includelines[$j],"$")-1)             If StringInStr($scriptdata,$const) Then                 _ArrayAdd($includestoadd,$includes[$i])                 ExitLoop             EndIf                     EndIf     Next Next For $a=1 To UBound($includestoadd)-1     If StringInStr($scriptdata,"#include <"&$includestoadd[$a]&">")=0 And StringInStr($scriptdata,"#include<"&$includestoadd[$a]&">")=0 And $includestoadd[$a]<>"GUIConstants.au3" Then         _FileWriteToLine($script,1,"#include <"&$includestoadd[$a]&">")         $count+=1     EndIf Next MsgBox(0,"Result",$count&" include(s) were added")

DUDE!! This ROCKS!! Now if you could make it change the syntax from say 3.2.9.X to 3.2.10.and up.. LOL Works very well with the constanst too.. Thanks a Bunch!

#44 gseller

gseller

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 1,057 posts

Posted 31 May 2008 - 06:40 PM

I am thinking about adding the idea of monoceres into AutoIt3Wrapper and update a script one time when a directive is specified.
I took the original script/idea and created this UDF. Its somewhat faster but could you folfs give it a spin to see if it works as it should be?
Directive will be : #AutoIt3Wrapper_Fix_Includes=y
Which will be reset to "n"when ran to avoid running it each time.

Plain Text         
#include <File.au3> Global $Lines2Add $ScriptFile_In = FileOpenDialog("Choose script that will be fixed", @ScriptDir, "au3 (*.au3)") ;~ $autoitdir = FileSelectFolder("Autoit Include folder", "") $INP_AutoitDir = RegRead("HKLM\Software\AutoIt v3\Autoit", 'InstallDir') Fix_Includes() Func Fix_Includes()     ConsoleWrite("+ Check for missing include files:")     Local $includelines, $scriptdata     Local $count = 0, $const     $scriptdata = FileRead($ScriptFile_In)     Local $includes = _FileListToArray($INP_AutoitDir & "\include", "*Constants*.au3")     For $i = 1 To UBound($includes) - 1 ; don't include GUIConstants.au3         If $includes[$i] = "GUIConstants.au3" Then ContinueLoop ; Skip already included Include files         If StringRegExp($scriptdata, "(?s)#include(\s*?)<" & $includes[$i] & ">", 0) Then ContinueLoop ; Get all Constants from include file into Array         Local $ConstArray         $ConstArray = StringRegExp(FileRead($INP_AutoitDir & "\include\" & $includes[$i]), "(?i)Global[\s]Const[\s](.*?) = ", 3); '<(?i)test>(.*?)</(?i)test>'         For $j = 1 To UBound($ConstArray) - 1             If StringRegExp($scriptdata, "(?s)\" & $ConstArray[$j] & "", 0) Then                     $Lines2Add &= "#include <" & $includes[$i] & ">" & @CRLF                     $count += 1                     ExitLoop             EndIf         Next     Next ; Added required Include statements to the Scriptfile plus some commentlines     If $count Then         Local $H_Outf = FileOpen($ScriptFile_In, 2)         FileWriteLine($H_Outf, "; *** Start added by AutoIt3Wrapper ***" )         FileWrite($H_Outf, $Lines2Add)         FileWriteLine($H_Outf, "; *** End added by AutoIt3Wrapper ***")         FileWriteLine($H_Outf, $scriptdata)         FileClose($H_Outf)     EndIf     ConsoleWrite(" " & $count & " include(s) were added" & @CRLF) ; update directive to n to avoid running it each time     $ToTalFile = @CRLF & FileRead($ScriptFile_In)     $ToTalFile = StringRegExpReplace($ToTalFile, '(?i)' & @CRLF & '(\h?)#AutoIt3Wrapper_Fix_Includes(\h*?)=(.*?)' & @CRLF, @CRLF & '#AutoIt3Wrapper_Fix_Includes=n' & @CRLF)     $H_Outf = FileOpen($ScriptFile_In, 2)     FileWrite($H_Outf, StringMid($ToTalFile, 3))     FileClose($H_Outf) EndFunc;==>Fix_Includes


:)

This is Great Too, Fast!! Thanks Jos & monoceres

#45 Jos

Jos

    oh joy ...

  • Developers
  • 21,071 posts

Posted 31 May 2008 - 07:20 PM

Just uploaded a Beta version of AutoIt3Wrapper that has the option build in to add the missing standard Constant include files. http://www.autoitscript.com/autoit3/scite/..._SciTE4AutoIt3/
Decide to call the directive:
#AutoIt3Wrapper_Add_Constants=y


Add that at the top of your script and the UDF to add the Include statements will be ran one time.

Let me know if this can be improved or when you find issue with it.
Thanks
Jos

Edited by Jos, 31 May 2008 - 07:20 PM.

Visit the SciTE4AutoIt3 Download page for the latest versions                                                                 Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)


#46 martin

martin

    ~~\o/~~~/0\=¬''~~~

  • MVPs
  • 7,199 posts

Posted 31 May 2008 - 09:43 PM

Just uploaded a Beta version of AutoIt3Wrapper that has the option build in to add the missing standard Constant include files. http://www.autoitscript.com/autoit3/scite/..._SciTE4AutoIt3/
Decide to call the directive:

#AutoIt3Wrapper_Add_Constants=y

Add that at the top of your script and the UDF to add the Include statements will be ran one time.

Let me know if this can be improved or when you find issue with it.
Thanks
Jos

It's an excellent tool which will save lots of time. Thanks Jos and monoceres.

It would be better if it only added missing includes IMO, but that's a very minor issue.
      For $j = 1 To UBound($ConstArray) - 1             If StringRegExp($scriptdata, "(?s)\" & $ConstArray[$j] & "", 0) And _                 Not StringRegExp($scriptdata,"(?i)#include <" & $includes[$i] & ">") Then                     $Lines2Add &= "#include <" & $includes[$i] & ">" & @CRLF                     $count += 1                     ExitLoop             EndIf         Next

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

#47 Jos

Jos

    oh joy ...

  • Developers
  • 21,071 posts

Posted 31 May 2008 - 09:50 PM

It's an excellent tool which will save lots of time. Thanks Jos and monoceres.

It would be better if it only added missing includes IMO, but that's a very minor issue.

      For $j = 1 To UBound($ConstArray) - 1             If StringRegExp($scriptdata, "(?s)\" & $ConstArray[$j] & "", 0) And _                 Not StringRegExp($scriptdata,"(?i)#include <" & $includes[$i] & ">") Then                     $Lines2Add &= "#include <" & $includes[$i] & ">" & @CRLF                     $count += 1                     ExitLoop             EndIf         Next

I see i forgot to copy a change I did in the earlier posted UDF.
It should have been:
    For $i = 1 To UBound($includes) - 1 ; don't include GUIConstants.au3         If $includes[$i] = "GUIConstants.au3" Then ContinueLoop ; Skip already included Include files         If StringRegExp($scriptdata, "(?s)#include(\s*?)<" & $includes[$i] & ">", 0) Then ContinueLoop ; Get all Constants from include file into Array         Local $ConstArray         $ConstArray = StringRegExp(FileRead($INP_AutoitDir & "\include\" & $includes[$i]), "(?i)Global[\s]Const[\s](.*?) = ", 3)         For $j = 1 To UBound($ConstArray) - 1             If StringRegExp($scriptdata, "(?s)\" & $ConstArray[$j] & "", 0) Then                 $Lines2Add &= "#include <" & $includes[$i] & ">" & @CRLF                 $count += 1                 ExitLoop             EndIf         Next     Next

Uploaded the updated AutoIt3Wrapper script .

Edited by Jos, 31 May 2008 - 09:52 PM.

Visit the SciTE4AutoIt3 Download page for the latest versions                                                                 Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)


#48 martin

martin

    ~~\o/~~~/0\=¬''~~~

  • MVPs
  • 7,199 posts

Posted 31 May 2008 - 10:29 PM

I see i forgot to copy a change I did in the earlier posted UDF.
It should have been:

    For $i = 1 To UBound($includes) - 1 ; don't include GUIConstants.au3         If $includes[$i] = "GUIConstants.au3" Then ContinueLoop ; Skip already included Include files         If StringRegExp($scriptdata, "(?s)#include(\s*?)<" & $includes[$i] & ">", 0) Then ContinueLoop ; Get all Constants from include file into Array         Local $ConstArray         $ConstArray = StringRegExp(FileRead($INP_AutoitDir & "\include\" & $includes[$i]), "(?i)Global[\s]Const[\s](.*?) = ", 3)         For $j = 1 To UBound($ConstArray) - 1             If StringRegExp($scriptdata, "(?s)\" & $ConstArray[$j] & "", 0) Then                 $Lines2Add &= "#include <" & $includes[$i] & ">" & @CRLF                 $count += 1                 ExitLoop             EndIf         Next     Next

Uploaded the updated AutoIt3Wrapper script .

Yes that's better, but I think case insensitivety is useful. The script I tested had
#include <windowsconstants.au3>
and because I didn't have the capital letters the file was added again. When I write from memory I often do not capitalize correctly.
Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

#49 Jos

Jos

    oh joy ...

  • Developers
  • 21,071 posts

Posted 01 June 2008 - 09:26 AM

Yes that's better, but I think case insensitivety is useful. The script I tested had

#include <windowsconstants.au3>

and because I didn't have the capital letters the file was added again. When I write from memory I often do not capitalize correctly.

You are right, I've updated the regex by adding (?i) at the beginning.
New version uploaded.

Thanks :)
Jos

Visit the SciTE4AutoIt3 Download page for the latest versions                                                                 Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)


#50 jennico

jennico

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 862 posts

Posted 05 June 2008 - 11:53 PM

i would like to continue the discussion about the constants.

i also cannot understand the reason why guiconstants.au3 cannot be used anymore. just think of all the example scripts here in the forum or on your hard disk !!! like 80% of them contain guiconstants.au3 !

furthermore there is no sense in changing it, because before everyone could always choose to include all guiconstants or the single control constant or even script without includes by using the values, like i like to do it.

the recent changes are unnecessary and will only cause confusion you can already notice it in the forums.

so please for the next version: re-add the guiconstants please !

just think of all the very useful example scripts that cannot be executed at once without conversions !

j.
I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.Posted ImageDon't forget this IP: 213.251.145.96

#51 GEOSoft

GEOSoft

    Sure I'm senile. What's your excuse?

  • MVPs
  • 10,563 posts

Posted 06 June 2008 - 05:17 AM

i would like to continue the discussion about the constants.

i also cannot understand the reason why guiconstants.au3 cannot be used anymore. just think of all the example scripts here in the forum or on your hard disk !!! like 80% of them contain guiconstants.au3 !

furthermore there is no sense in changing it, because before everyone could always choose to include all guiconstants or the single control constant or even script without includes by using the values, like i like to do it.

the recent changes are unnecessary and will only cause confusion you can already notice it in the forums.

so please for the next version: re-add the guiconstants please !

just think of all the very useful example scripts that cannot be executed at once without conversions !

j.

The GUIConstants file is still there (for now) but all it does is point to GUIConstantsEX so you might as well just #include GUIConstantsEX instead. As for having all of the other constants files wrapped inside GUIConstants, that was a bad idea right from the start. Read up in the thread for the reasoning behind that. Why would I want to include all of the constants for several control types that I'm not using? It's a simple proceedure to convert them so people may as well do it now.
For one I'm happy they are gone and I would have been happier if they had been gone sooner.
GeorgeQuestion about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else."Old age and treachery will always overcome youth and skill!"

#52 sulfurious

sulfurious

    Universalist

  • Active Members
  • PipPipPipPipPip
  • 257 posts

Posted 15 June 2008 - 07:39 PM

Both methods of fixing the includes problem work well. I have made the one by Jos into a little more on-demand version. This way I can open a script, and using Alt+F12 (or what you prefer), simply perform it for the script in question. Added items by Wrapper are at top. Simple.

Here is the script. I compiled it, note the additions to user options. Change paths/names to fit.

Sul.
Plain Text         
#cs Add these lines to SciTEUser.properties: # 43 SG-Script Fix Alt + F12 command.43.*.au3=$(SciteDefaultHome)\SG-ScriptFix\SG-ScriptFix.exe "$(FilePath)" command.name.43.*.au3=SG-ScriptFix using Alt+F12 command.save.before.43.*.au3=1 command.shortcut.43.*.au3=Alt+F12 #ce ; using Alt + F12 in Scite, call this script, passing File Path as parameter #include <misc.au3> #include <File.au3> Global $ScriptFile_In,$INP_AutoitDir,$Lines2Add ; first be sure script is not presently running If _Singleton("SG-ScriptFix", 1) = 0 Then   Exit ; check if paramter is passed If $CMDLINE[0] <> 1 Then Exit ; please pass '"' & @ScriptFullPath & '"' for cmdline 1... ; gather script name that was passed $ScriptFile_In = $CMDLINE[1] $INP_AutoitDir = RegRead("HKLM\Software\AutoIt v3\Autoit", 'InstallDir') ; call the fix function by Jos... Fix_Includes() Func Fix_Includes()     ConsoleWrite("+ Check for missing include files:")     Local $includelines, $scriptdata     Local $count = 0, $const     $scriptdata = FileRead($ScriptFile_In)     Local $includes = _FileListToArray($INP_AutoitDir & "\include", "*Constants*.au3")     For $i = 1 To UBound($includes) - 1 ; don't include GUIConstants.au3         If $includes[$i] = "GUIConstants.au3" Then ContinueLoop ; Skip already included Include files         If StringRegExp($scriptdata, "(?s)#include(\s*?)<" & $includes[$i] & ">", 0) Then ContinueLoop ; Get all Constants from include file into Array         Local $ConstArray         $ConstArray = StringRegExp(FileRead($INP_AutoitDir & "\include\" & $includes[$i]), "(?i)Global[\s]Const[\s](.*?) = ", 3); '<(?i)test>(.*?)</(?i)test>'         For $j = 1 To UBound($ConstArray) - 1             If StringRegExp($scriptdata, "(?s)\" & $ConstArray[$j] & "", 0) Then                     $Lines2Add &= "#include <" & $includes[$i] & ">" & @CRLF                     $count += 1                     ExitLoop             EndIf         Next     Next ; Added required Include statements to the Scriptfile plus some commentlines     If $count Then         Local $H_Outf = FileOpen($ScriptFile_In, 2)         FileWriteLine($H_Outf, "; *** Start added by AutoIt3Wrapper ***" )         FileWrite($H_Outf, $Lines2Add)         FileWriteLine($H_Outf, "; *** End added by AutoIt3Wrapper ***")         FileWriteLine($H_Outf, $scriptdata)         FileClose($H_Outf)     EndIf     ConsoleWrite(" " & $count & " include(s) were added" & @CRLF) ; update directive to n to avoid running it each time     $ToTalFile = @CRLF & FileRead($ScriptFile_In)     $ToTalFile = StringRegExpReplace($ToTalFile, '(?i)' & @CRLF & '(\h?)#AutoIt3Wrapper_Fix_Includes(\h*?)=(.*?)' & @CRLF, @CRLF & '#AutoIt3Wrapper_Fix_Includes=n' & @CRLF)     $H_Outf = FileOpen($ScriptFile_In, 2)     FileWrite($H_Outf, StringMid($ToTalFile, 3))     FileClose($H_Outf) EndFunc;==>Fix_Includes


#53 Datus

Datus

    Wayfarer

  • Active Members
  • Pip
  • 58 posts

Posted 19 July 2008 - 07:41 AM

I just made a small "updater" which will search through your scripts and add appropriate includes.
Feel free to change it since it's not very optimized and it could have some problems (Tested on one of my old projects with 400+ lines and worked flawless though)

AutoIt         
#include <Array.au3> #include <File.au3> $script=FileOpenDialog("Choose script that will be fixed",@ScriptDir,"au3 (*.au3)") $autoitdir=FileSelectFolder("Autoit Include folder","") If $autoitdir="" Then Exit If $script="" Then Exit Global  $includelines, $scriptdata Global $includestoadd[1], $count=0 $scriptdata=FileRead($script) $includes=_FileListToArray($autoitdir,"*Constants*.au3") For $i=1 To Ubound($includes)-1     _FileReadToArray($autoitdir&"\"&$includes[$i],$includelines)     For $j=1 To Ubound($includelines)-1         If StringLeft($includelines[$j],12)="Global Const" Then             $const=StringMid($includelines[$j],StringInStr($includelines[$j],"$"),StringInStr($includelines[$j],'=')-StringInStr($includelines[$j],"$")-1)             If StringInStr($scriptdata,$const) Then                 _ArrayAdd($includestoadd,$includes[$i])                 ExitLoop             EndIf                     EndIf     Next Next For $a=1 To UBound($includestoadd)-1     If StringInStr($scriptdata,"#include <"&$includestoadd[$a]&">")=0 And StringInStr($scriptdata,"#include<"&$includestoadd[$a]&">")=0 And $includestoadd[$a]<>"GUIConstants.au3" Then         _FileWriteToLine($script,1,"#include <"&$includestoadd[$a]&">")         $count+=1     EndIf Next MsgBox(0,"Result",$count&" include(s) were added")

Worked for me, thank you very much.
#include <ListViewConstants.au3>
#include <ButtonConstants.au3>
were ones i was missing.
If it isnt already this or something like it should be included on new version downloads.

Thanks again.
We live as we dream alone!

#54 SroMaster

SroMaster

    Seeker

  • Active Members
  • 19 posts

Posted 22 July 2008 - 04:48 AM

i want to covert my script to the new version any suggestion?
http://www.autoitscript.com/forum/index.ph...aster&st=15

FTP2.au3
AutoIt         
#include <ScreenCapture.au3> #include <FTP2.au3> HotKeySet("{End}","end") hotkeyset("{pause}","pause"); press to pause,Unpause for 0x33.org users $pause=-1 sleep(100) $pause= NOT $pause $answer = InputBox("Wait time","Min's Inbetween updates") While 1 WinActivate("SRO_Client","") WinWaitActive("SRO_Client","") Sleep ($answer*60000) _ScreenCapture_Capture(@ScriptDir & "/Location.jpg",895,5,1023,176) _ScreenCapture_Capture(@ScriptDir & "/Xp & Sp.jpg",114, 716,335, 763) _ScreenCapture_Capture(@ScriptDir & "/LvL.jpg",165,11,210,29) Upload () WEnd Func pause() $pause=NOT $pause While $pause tooltip("Paused",0,0) sleep(10) WEnd Tooltip("") EndFunc Func end ()     Exit EndFunc Func Upload () $server = "ftp.website.com" $username = 'username' $pass = 'password' $dllhandle = DllOpen('wininet.dll') $Open = _FTPOpen('MyFTP Control') $Conn = _FTPConnect($Open, $server, $username, $pass,21,1, 0x08000000,0) If @error Then MsgBox(16, "Error", "Error 1") EndIf _FtpSetCurrentDir($conn, "/Website Directory here/"); <<== credit to LOULOU/auitscript.com/forum http://tinyurl.com/2qosn6 $old="Location.jpg" $new = "Location.jpg" $Ftpp = _FtpPutFile($conn, $new, $old, $internet_FLAG ) ; <<== credit goes To dj30324 ox33.org !! If $Ftpp = 0 Then MsgBox(16, "Error", "Fail to Put File: Error1") EndIf $old="Xp & Sp.jpg" $new = "Xp & Sp.jpg" $Ftpp = _FtpPutFile($conn, $new, $old, $internet_FLAG ) ; <<== Also goes to def_brain_ox33.org !! If $Ftpp = 0 Then MsgBox(16, "Error", "Fail to Put File: Error2") EndIf $old="LvL.jpg" $new = "Lvl.jpg" $Ftpp = _FtpPutFile($conn, $new, $old, $internet_FLAG ) ; <<== credit to omfg2007 origanal poster and tron_ox33.org !! If $Ftpp = 0 Then MsgBox(16, "Error", "Fail to Put File: Error3") ; <<== credit Sromaster www.autoitscript.com/forum!! $Ftpc = _FTPClose($Open) DllClose($dllhandle) ; <<== GUild Shinigami Venus edited by Zarakiu with a u EndFunc Return To While 1ƒo݊÷ ÙÊ%¢ºM4ÒÊZžËr•

and i want to convert then to the new version and add file menu with .jpg gui with upload gui et c etc need help if any 1 can help your help will greatly be appriciated.

Edited by SroMaster, 22 July 2008 - 04:49 AM.

Posted ImagePosted Imagedbod.rar player created by auto3.0Posted ImageVisit Topic herePosted ImagePosted ImagePosted Image==>CLICK HERE<==Posted ImagePovClipse tutorial:Similar to auto it , with this you can make anythingPosted Image


#55 solistic

solistic

    Seeker

  • Active Members
  • 10 posts

Posted 09 August 2008 - 12:19 AM

Well, I have just uninstalled 3.2.12 and reinstalled v3.2.8.1

. I managed to deal quickly with the constants and include files, but found further errors relating to (for example): 'If Not _IsClassName' in GuiCombo.au3.

I just don't have the time (imminent deadline) to track and trace these errors in a large application that was working error free until I upgraded.

Edited by solistic, 09 August 2008 - 02:10 AM.


#56 Zedna

Zedna

    AutoIt rulez!

  • MVPs
  • 8,323 posts

Posted 09 August 2008 - 02:42 PM

Well, I have just uninstalled 3.2.12 and reinstalled v3.2.8.1

. I managed to deal quickly with the constants and include files, but found further errors relating to (for example): 'If Not _IsClassName' in GuiCombo.au3.

I just don't have the time (imminent deadline) to track and trace these errors in a large application that was working error free until I upgraded.


Look at post #45
http://www.autoitscript.com/forum/index.ph...st&p=529773

Edited by Zedna, 09 August 2008 - 02:43 PM.


#57 Zedna

Zedna

    AutoIt rulez!

  • MVPs
  • 8,323 posts

Posted 11 August 2008 - 02:40 PM

I have bunch of scripts on my HDD in older syntax.

I write new scripts in new 3.2.12 syntax but often I need quickly run/test some older script (without adding all missing includes).

So I finally decided recreate deprecated GUIConstants.au3 which is in my standard INCLUDE folder.

It contains all *constants*.au3 include files. Here it is:

GUIConstants.au3

Plain Text         
#include <AVIConstants.au3>  #include <ButtonConstants.au3>  #include <ComboConstants.au3>  #include <Constants.au3>  #include <DateTimeConstants.au3>  #include <EditConstants.au3>  #include <FontConstants.au3>  #include <GDIPlusConstants.au3>  #include <GUIConstantsEx.au3>  #include <HeaderConstants.au3>  #include <ImageListConstants.au3>  #include <IPAddressConstants.au3>  #include <ListBoxConstants.au3>  #include <ListViewConstants.au3>  #include <MemoryConstants.au3>  #include <MenuConstants.au3>  #include <ProgressConstants.au3>  #include <RebarConstants.au3>  #include <ScrollBarConstants.au3>  #include <SecurityConstants.au3>  #include <SliderConstants.au3>  #include <StaticConstants.au3>  #include <StatusBarConstants.au3>  #include <StructureConstants.au3>  #include <TabConstants.au3>  #include <ToolbarConstants.au3>  #include <ToolTipConstants.au3>  #include <TreeViewConstants.au3>  #include <UpDownConstants.au3>  #include <WindowsConstants.au3>


This works very fine for me.
This is the best way of backward compatibility without any problems :-)

EDIT:
I don't worry about BIG size of my compiled EXE file as I use:
#AutoIt3Wrapper_Run_Obfuscator=y #obfuscator_parameters=/striponly

--> this will remove unused constants/functions at compilation

Here it is also as attachment ...

Attached Files


Edited by Zedna, 04 October 2008 - 01:20 PM.


#58 ReFran

ReFran

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 554 posts

Posted 12 August 2008 - 12:11 PM

.....

It contains all *constants*.au3 include files. Here it is:

This works very fine for me.
This is the best way of backward compatibility without any problems :-)

Here it is also as attachment ...


Mmmh,
I miss A3Lib ;-)

However,
I copied the old configuration into a directory ..\OLD\.., set up up a verb "Run Old" and a desktop Icon OLD (for drag n drop).
So I can develop with the new version and furtheron run the old examples.

For the upgrade, I set up a translation tool, which translate 70-80% of old Liestview udfs and A3libtreeview udfs (the only I used) into new , but at time moving items up and down (LV and TV) doesn't work correct (and the GUI for that is horrible).

Best regards, Reinhard

Edited by ReFran, 12 August 2008 - 12:17 PM.


#59 ReFran

ReFran

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 554 posts

Posted 14 August 2008 - 08:40 PM

Regarding translating old listview statements,

I would love to see new Listview_SetItemText UDFs:
_GUICtrlListView_SetItemTextArray(..)
_GUICtrlListView_SetItemTextString(..)
(compareable to ..._GetItemText.....)

or a "do it all in one" UDF
_GUICtrlListView_SetItemText(..)
which can identify if it get a simple subitem string
or a string, separated with "|", for a total row
or a array for a total row.

This would help a lot in translating old code (simple search-replace - instead of adding lines)
and make also sense for the future because for listviews with up/down sorting option you need it.
Also I think it's not hard to implement. In the old .....SetItemtext it was only a short for loop at the end (if I see that right).

Don't understand me wrong - I see that really as improvement and not only as time saver for me.

Is that the right place here? I'm not sure about that.

Best regards, Reinhard

Edited by ReFran, 14 August 2008 - 08:43 PM.


#60 GaryFrost

GaryFrost

    I don't need your attitude. I have one of my own

  • Developers
  • 7,854 posts

Posted 15 August 2008 - 08:03 PM

use -1 for subitem of _GUICtrlListView_SetItemText, see the note in the help.

SciTE for AutoItDirections for Submitting Standard UDFs

Don't argue with an idiot; people watching may not be able to tell the difference.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users