am632 Posted November 6, 2014 Posted November 6, 2014 Hi, I have a problem when using ISN, I have created a GUI which for example has lables determined by variables, the variables are determined from functions which I have added in the 'Extracode for GUI' but they dont work because the script is executed in the wrong order. If I open the gui.isn file in notepad++ for example I can see all the 'extracode' functions I added are at the top of the script, and my gui is at the bottom, If I re-order the code in notepad++ so the GUI code is executed first the script works, but when I open the GUI in ISN again to make changes it automatically re-arranges the code so the gui code is at the bottom and the script doesnt work again, how can I stop this from happening please? So basically I want my GUI code at the top of the script and my extra code at the bottom not the other way around. Thanks
ISI360 Posted November 9, 2014 Author Posted November 9, 2014 (edited) Hi Please do not manually edit the isf file! How you say it will be overwritten when you resave the file. The "Extracode for GUI" is only for the GUI itself. (So the code comes after GuiCreate) You can also add some Extracode to every Control you want. Just hit the "Extracode" button in the controleditor on the right side. But you can also try this: Make a label and check in the controleditor the option "Text from Func". Now insert your Variable (or function) in the Text/Data input and it sould work! (The "Text from func" mode tells the formstudio that the content is comming from a variable or an function) Edited November 9, 2014 by ISI360
am632 Posted November 9, 2014 Posted November 9, 2014 Hi, thanks for the help, I didn't realise I was adding the code in wrong section, I added it to the controls extracode like you said and now its working as it should be, and thanks for the tip about the 'Text from func' im sure i'll use this at some point
willichan Posted November 10, 2014 Posted November 10, 2014 ISI360, Still loving this app. I found a minor issue when I right click on an #include statement and select "Open File (CTRL+I)". If it is in the standard UDF folder, it opens fine. If it is in the same directory as the open script, it opens fine. If it is in "user-defined libraries", however, it will not open, nor will it give an error. I just seems to ignore it. I have my own UDFs, and UDFs by others in different directories to avoid confusion, and also to allow me to create special "override" versions of the standard UDFs. The paths to search are kept in "HKLMSoftwareAutoIt v3AutoItInclude" The path search order is different, depending on whether you use #include "UDF.au3" or #include <UDF.au3>, and is outlined in the help file under "Keyword Reference" --> "#include" My UDFs: Barcode Libraries, Automate creation of any type of project folder, File Locking with Cooperative Semaphores, Inline binary files, Continue script after reboot, WinWaitMulti, Name Aggregator, Enigma, CornedBeef Hash
willichan Posted November 13, 2014 Posted November 13, 2014 Had another issue. I just downloaded the latest version (0.96beta) to my laptop. This was a fresh install to a virgin Win7Pro64 system. At first run after installing, it gave me the "First 5" trophy (I did have 5 projects already in the projects folder), then gave me an AppCrash. Main Executable for ISN AutoItStudio has stopped working Problem signature: Problem Event Name: APPCRASH Application Name: Autoit_Studio.exe Application Version: 0.96.0.0 Application Timestamp: 5313664e Fault Module Name: Autoit_Studio.exe Fault Module Version: 0.96.0.0 Fault Module Timestamp: 5313664e Exception Code: c0000005 Exception Offset: 0000cf6c OS Version: 6.1.7601.2.1.0.256.48 Locale ID: 1033 Additional Information 1: 0a9e Additional Information 2: 0a9e372d3b4ad19135b953a78882e789 Additional Information 3: 0a9e Additional Information 4: 0a9e372d3b4ad19135b953a78882e789 Read our privacy statement online: http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409 If the online privacy statement is not available, please read our privacy statement offline: C:\Windows\system32\en-US\erofflps.txt The Config.ini contains [config] autoitexe=C:\Program Files (x86)\AutoIt3\AutoIt3.exe helpfileexe=C:\Program Files (x86)\AutoIt3\AutoIt3Help.exe autoit2exe=C:\Program Files (x86)\AutoIt3\Aut2Exe\Aut2exe.exe language=english.lng registerau3files=false registerisnfiles=true registerispfiles=true registerinexplorer=true projectfolder=C:\Users\willichan\Copy\MyAU3Projects releasefolder=C:\Users\willichan\Copy\MyAU3Projects\Release SciTE4AutoIt_au3mode= startups=1 [trophies] TROP5=1 TROP12=0 It started the second and successive times without errors. My UDFs: Barcode Libraries, Automate creation of any type of project folder, File Locking with Cooperative Semaphores, Inline binary files, Continue script after reboot, WinWaitMulti, Name Aggregator, Enigma, CornedBeef Hash
TheAppleFreak Posted December 2, 2014 Posted December 2, 2014 I may have found an issue with the debugger. I'm currently working on adapting >JSThePatriot's ComputerInfo UDFs to work with Scripting.Dictionary COM objects instead of arrays for easier use with the excellent >JSMN library; debugging it has been difficult as the old AutoIT Debugger of ages past throws a fatal error when it tries running JSMN. I just tested my port in ISN using the Test Current Script (F9) option, but the debugger returned an error relating to the Dbug.au3 UDF in ISN. The particular code snippet I was testing (all necessary code is present, except for the JSMN library): expandcollapse popup#include-once #include <File.au3> #include <Array.au3> #region Header #comments-start Title: Computer Information Automation UDF Library for AutoIt3 Filename: CompInfo.au3 Description: A collection of UDF's that assist in gathering and setting information about a computer (Software and Hardware). Author: Jarvis J. Stubblefield (JSThePatriot) http://www.vortexrevolutions.com/ Modified by: TheAppleFreak, for use with the JSMN library and my own spaghetti code Version: 00.03.08_JSMN Last Update: 12.2.2014 Requirements: AutoIt v3.2 +, Developed/Tested on WindowsXP Pro Service Pack 2 Notes: Errors associated with incorrect objects will be common user errors. AutoIt beta 3.1.1.63 has added an ObjName() function that will be used to trap and report most of these errors. Special thanks to JdeB (WMI Introduction), SvenP (Scriptomatic), Firestorm (testing, ideas), gafrost (WMI Support), piccaso (COM Errors), RagnaroktA (testing, ideas, bug fixes), SmOke_N (testing), and everyone else that has helped in the creation of this UDF. #comments-end #endregion Header #region Global Variables and Constants If Not(IsDeclared("$cI_CompName")) Then Global $cI_CompName = @ComputerName EndIf Global Const $cI_VersionInfo = "00.03.08" Global Const $cI_aName = 0, _ $cI_aDesc = 4 Global $wbemFlagReturnImmediately = 0x10, _ ;DO NOT CHANGE $wbemFlagForwardOnly = 0x20 ;DO NOT CHANGE Global $ERR_NO_INFO = "Array contains no information", _ $ERR_NOT_OBJ = "$colItems isnt an object" #endregion Global Variables and Constants #region Hardware Functions ; --snipped all other functions-- Func _ComputerGetBIOS() Local $colItems, $objWMIService, $objItem, $i = 0 Local $profile[1] = [ObjCreate("Scripting.Dictionary")] $objWMIService = ObjGet("winmgmts:\\" & $cI_Compname & "\root\CIMV2") $colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_BIOS", "WQL", $wbemFlagReturnImmediately + $wbemFlagForwardOnly) If IsObj($colItems) Then For $objItem In $colItems ReDim $profile[UBound($profile) + 1] $profile[Ubound($profile) - 1] = ObjCreate("Scripting.Dictionary") $profile[$i].Add("Name", $objItem.Name) $profile[$i].Add("Status", $objItem.Status) $profile[$i].Add("BiosCharacteristics", $objItem.BiosCharacteristics(0)) $profile[$i].Add("BIOSVersion", $objItem.BIOSVersion(0)) $profile[$i].Add("Description", $objItem.Description) $profile[$i].Add("BuildNumber", $objItem.BuildNumber) $profile[$i].Add("CodeSet", $objItem.CodeSet) $profile[$i].Add("CurrentLanguage", $objItem.CurrentLanguage) $profile[$i].Add("IdentificationCode", $objItem.IdentificationCode) $profile[$i].Add("InstallableLanguages", $objItem.InstallableLanguages) $profile[$i].Add("LanguageEdition", $objItem.LanguageEdition) $profile[$i].Add("ListOfLanguages", $objItem.ListOfLanguages(0)) $profile[$i].Add("Manufacturer", $objItem.Manufacturer) $profile[$i].Add("OtherTargetOS", $objItem.OtherTargetOS) $profile[$i].Add("PrimaryBIOS", $objItem.PrimaryBIOS) $profile[$i].Add("ReleaseDate", __StringToDate($objItem.ReleaseDate)) $profile[$i].Add("SerialNumber", StringStripWS($objItem.SerialNumber, 3)) $profile[$i].Add("SMBIOSBIOSVersion", $objItem.SMBIOSBIOSVersion) $profile[$i].Add("SMBIOSMajorVersion", $objItem.SMBIOSMajorVersion) $profile[$i].Add("SMBIOSMinorVersion", $objItem.SMBIOSMinorVersion) $profile[$i].Add("SMBIOSPresent", $objItem.SMBIOSPresent) $profile[$i].Add("SoftwareElementID", $objItem.SoftwareElementID) $profile[$i].Add("SoftwareElementState", $objItem.SoftwareElementState) $profile[$i].Add("TargetOperatingSystem", $objItem.TargetOperatingSystem) $profile[$i].Add("Version", $objItem.Version) $i += 1 Next If $profile[Ubound($profile) - 1].Count < 1 Then ReDim $profile[Ubound($profile) - 1] EndIf If Ubound($profile) < 1 Then Return SetError(1, 1, 0) EndIf Else Return SetError(1, 2, 0) EndIf Return $profile EndFunc ;_ComputerGetBIOS #endRegion Hardware Functions #include "JSMN.au3" $arr = _ComputerGetBIOS() If @error Then MsgBox(16, "Error", @error & @CRLF & @extended) Else $arr = JSMN_Encode($arr, $JSMN_PRETTY_PRINT) $temp = _TempFile() FileWrite($temp, $arr) RunWait("notepad.exe " & $temp) FileDelete($temp) EndIf #region Internal Functions ; ********************************************************************************** ; Internal Functions with names starting with two underscores will not be documented ; as user functions. ; ********************************************************************************** Func __StringVersion() Return $cI_VersionInfo EndFunc ;_StringVersion Func __StringToDate($dtmDate) Return (StringMid($dtmDate, 5, 2) & "/" & _ StringMid($dtmDate, 7, 2) & "/" & StringLeft($dtmDate, 4) _ & " " & StringMid($dtmDate, 9, 2) & ":" & StringMid($dtmDate, 11, 2) & ":" & StringMid($dtmDate,13, 2)) EndFunc ;__StringToDate Function created by SvenP Modified by JSThePatriot Func __IsEmpty(ByRef Const $string) If $string = "" And $string = 0 Then Return True Else Return False EndIf EndFunc ;__IsEmpty() #endregion Internal Functions The error I received in ISN: Starting file CompInfoObject.au3... + DBUG started with 0 arguments. "D:\Programs\ISN Studio\Data\Dbug\Dbug.au3" (933) : ==> Variable used without being declared.: For $x = 1 To $aListViewSortInfo[0][0] For $x = 1 To ^ ERROR CompInfoObject.au3 -> Exit Code: 1 (Runtime: 2.27 sec) The contents of _DBGGUICtrlListView_SortItems_NoToggle() (the function encompassing line 933 in Dbug.au3) expandcollapse popup; sort listview, but don't change sort order Func _DBGGUICtrlListView_SortItems_NoToggle($HWND, $iCol, $nSortDir = 0) ;$nSortDir: 1=Ascending, -1=Descending, 0=Current Local $iRet, $iIndex, $pFunction, $hHeader, $iFormat If Not IsHWnd($HWND) Then $HWND = GUICtrlGetHandle($HWND) For $x = 1 To $aListViewSortInfo[0][0] If $HWND = $aListViewSortInfo[$x][1] Then $iIndex = $x ExitLoop EndIf Next $pFunction = DllCallbackGetPtr($aListViewSortInfo[$iIndex][2]) ; get pointer to call back $aListViewSortInfo[$iIndex][3] = $iCol ; $nColumn = column clicked If $nSortDir <> 0 Then $aListViewSortInfo[$iIndex][5] = $nSortDir ; $nSortDir $aListViewSortInfo[$iIndex][4] = $aListViewSortInfo[$iIndex][6] ; nCurCol = $nCol $iRet = _SendMessage($HWND, $LVM_SORTITEMS, $HWND, $pFunction, 0, "hwnd", "ptr") If $iRet <> 0 Then If $aListViewSortInfo[$iIndex][9] Then ; Use arrow in header $hHeader = $aListViewSortInfo[$iIndex][10] For $x = 0 To _GUICtrlHeader_GetItemCount($hHeader) - 1 $iFormat = _GUICtrlHeader_GetItemFormat($hHeader, $x) If BitAND($iFormat, $HDF_SORTDOWN) Then _GUICtrlHeader_SetItemFormat($hHeader, $x, BitXOR($iFormat, $HDF_SORTDOWN)) ElseIf BitAND($iFormat, $HDF_SORTUP) Then _GUICtrlHeader_SetItemFormat($hHeader, $x, BitXOR($iFormat, $HDF_SORTUP)) EndIf Next $iFormat = _GUICtrlHeader_GetItemFormat($hHeader, $iCol) If $aListViewSortInfo[$iIndex][5] = 1 Then ; ascending _GUICtrlHeader_SetItemFormat($hHeader, $iCol, BitOR($iFormat, $HDF_SORTUP)) Else ; descending _GUICtrlHeader_SetItemFormat($hHeader, $iCol, BitOR($iFormat, $HDF_SORTDOWN)) EndIf EndIf EndIf Return $iRet <> 0 EndFunc ;==>_DBGGUICtrlListView_SortItems_NoToggle Figured I'd let you know about that. Otherwise, I'm really enjoying the IDE! Much, much better so far than my old haphazard mix of Sublime, Form Builder, and AutoIT Debugger!
ISI360 Posted December 4, 2014 Author Posted December 4, 2014 Finally, ISN AutoIt Studio Version 0.97 BETA is now ONLINE! Happy testing! Changelog: (Powered by google translator) -> ISN AutoIt Studio: <- ----------------------------------- - Fix: Various bug fixes - Bugfix: Syntax update for AutoIt version 3.3.12.0 - Fix: Fixed a bug in which the generation of the script tree takes an extremely long - Fix: If the script is terminated by an error of this is now back in the script in red (This worked in version 0.96 no longer) - Fix: The function right click -> "Open File" in Includes now works properly again - Fix: AutoIt used since version 3.3.12.0 a new dialog for the "File Select Folder" command. The ISN starts using the _WinAPI_BrowseForFolderDlg command to restore the old dialog style. - Fix: Fixed a bug by the main file was opened when 2x - Bugfix: Now and then worked Autocomplete and intelisense in the code editor incorrect. This is now fixed. - Bugfix: EXE files created with #RequireAdmin, can now be started from the Proejktbaum. - NEW: Update of APIs AutoIt version 3.3.12.0 - NEW: The Debug window (below) is now no longer "read only" - NEW: The Debug window (below) has now got left donated own bar with buttons. Zb. View previous / next message or copy text to the clipboard. The bar is in the program settings but again are disabled - NEW: macros such as eg. "Compiling More AU3 file" behave now INTELLIGENT. Thus, for example. recognized in selecting the file if the file is located in the project and, if the file path supplemented by variables (eg.% projectdir%). There is also a new variable:% filedir% (path to the directory in which the file is to be processed straight) - NEW: The Parameter Editor. This can either be opened by right-clicking in the Script Editor or by double-clicking a function (eg. GUICreate)! (Double click functionality must first be activated in the Preferences). In the Parameter Editor, you can manage all the parameters of your function quickly and clearly. - NEW: It is now in the context menu of the project tree menu item "Compile". In it there are functions like eg. the Schnellkompilierung .au3 a file in the current directory or compile the file with a macro (new or existing macro). - NEW: There is now an additional plugin type: Type 3! A Type 3 plugin (modifier plugin) can replace certain processes and dialogues in the ISN yourself with your own. You can find more information about this in the Help plugin SDK. - NEW: "Compile Project - Settings" dialog revised. There is now the possibility that project to compile directly in the project folder (without copying it to a new folder). Furthermore, now more .au3 files are specified to be included in the compilation. - NEW: New variable for macros:% lastcompiledfile_exe% -> path to the last compiled .exe file. - NEW: New variable for macros:% lastcompiledfile_source% -> path to .au3 file from the last one .exe file was created. - NEW: New Trigger for macros: compiled file -> macro is ausgefürt after a .au3 file was compiled. (eg. If after compiling the project several .au3 files are compiled) - NEW: "Run Program" macro can be as projectdir%% passed as a parameter to use variables. Furthermore, parameters can be performed prior to the handover by Execute. Thus, for example. Variables such as $ configfile be passed as a parameter. - NEW: About the script tree, there is now a button for manually updating the script tree. - NEW: In the program settings under "Program Paths -> AutoIt Includes" can now different paths are indicated by AutoIt looks for includes. - WARNING: The amendment of StringEncrypt on _Crypt_EncryptData in the code by ISN it is necessary password for the proxy server (if any) to re-enter. (In the program settings) - REMOVED: The tool "Organize Includes" was removed from the ISN. (Reason: Organize Includes is no longer being developed and not working properly) -> ISN form Studio 2: <- ----------------------------------- - Fix: Various bug fixes - Bugfix: Syntax update for AutoIt version 3.3.12.0 - Fix: Fixed a bug when selecting a "click Func" on the "..." button. (Brought often the entire ISN crash) - Fix: Fixed a bug in which deim Selecting Styles (or ExStyles and States) similar entries were activated as well. (eg $ WS_MINIMIZE. at $ WS_MINIMIZEBOX) - Fix: Fixed a bug when a control from the toolbox was created using the right mouse button - Bugfix: Background colors for different controls are now set correctly - Bugfix: $ ES_NUMBER now works for UpDown Control - NEW: There are now entered in .isf ALSO Includes files! Note that # include-once duplicate information can be prevented. - NEW: The script editor in the form Studio (for extra code) now uses the Script Editor from the ISN AutoIt Studio (incl intelisense, AutoComplete, etc.). - NEW: When zoom in / out the Forms is now also a handy tooltip that displays the current window size in pixels - NEW: Context menus expanded somewhat (GUI Properties, change the text etc.) - NEW: "Generate Code" window, there are now 2 tabs. In the first of AU3 code is displayed as it is written later in the .isf. The second tab is the whole as a stand-alone script. (As before) -> Plugin SDK: <- ----------------------------------- - Bugfix: the variables were received from the ISN (getvar) are now declared as Global. - NEW: You can now also arrays (1D & 2D) received / sent.
SlowCoder74 Posted December 19, 2014 Posted December 19, 2014 ISI360, this is wonderful! I'd heard about the project some time ago, but hadn't played with it. I've only done a cursory look so far, but it looks like an excellent IDE ... with the forms builder included! Thank you for your hard work.
GhostLine Posted December 31, 2014 Posted December 31, 2014 Hi ! I've just printed one of my program, and I've been surprised to see that ISN Studio print directly to the printer, without any configuration possibility. So here's my request : could you print through the "classical" Windows printing manager, so I can have a "both side" printing ? Thanks !
ISI360 Posted December 31, 2014 Author Posted December 31, 2014 Yes the current print function is temporarily. But im searching for a lont time for methode to print from an scintilla control. Also in colour. (The current functions supports only balck/white) So if someone has an idea how to print in color from an scintilla control, please tell me
SorryButImaNewbie Posted January 26, 2015 Posted January 26, 2015 Hello, I try to display a 1d array to a listview. My code generates these items one by one, so the array is dynamicly growing (or shrinking in the case the user use up an item). I tried to displya it with this: (thy to TheDcoder) Func FuntionName() For $iMax = 1 To UBound($arr) - 1 GUICtrlSetData($ListHandle, $arr[$iMax]) Next EndFunc But this only display the last item of the array, I'm not good with arrays, so I may miss something elementary. I call the above function while my script is generating the items one by one and resize the array according of how big it should be, with this code: $iMax = UBound($arr) For $i = 1 To $iMax ; Check that the array is big enough If UBound($arr) = $i Then ; Resize the array when $i is equal to the element count in the array to prevent subscript error ReDim $arr[$arr[0] + $iMax] EndIf _ArrayAdd($arr, $VJszam) $arr[0] = $i ; update the index count for future reference Next ReDim $arr[$arr[0] + 1] _ArrayDisplay($arr) FuntionName() Thank you for the help!
Adele Posted February 6, 2015 Posted February 6, 2015 It is a great job. I have several suggestion: Moving tabs with mouse Coding mode for GUI (without exporting) Resizing several controls simultaneously (Like as Visual Studio) Automatic tab space on editor mode Drag - drop feature from Project tree And Turkish language. I want to help translating it to Turkish. Please contact me. Good day!
ISI360 Posted February 20, 2015 Author Posted February 20, 2015 Hello, I try to display a 1d array to a listview. My code generates these items one by one, so the array is dynamicly growing (or shrinking in the case the user use up an item). I tried to displya it with this: (thy to TheDcoder) Func FuntionName() For $iMax = 1 To UBound($arr) - 1 GUICtrlSetData($ListHandle, $arr[$iMax]) Next EndFunc But this only display the last item of the array, I'm not good with arrays, so I may miss something elementary. I call the above function while my script is generating the items one by one and resize the array according of how big it should be, with this code: $iMax = UBound($arr) For $i = 1 To $iMax ; Check that the array is big enough If UBound($arr) = $i Then ; Resize the array when $i is equal to the element count in the array to prevent subscript error ReDim $arr[$arr[0] + $iMax] EndIf _ArrayAdd($arr, $VJszam) $arr[0] = $i ; update the index count for future reference Next ReDim $arr[$arr[0] + 1] _ArrayDisplay($arr) FuntionName() Thank you for the help! Take a look at the _GUICtrlListView_AddArray command. (And the example in the AutoIt Help) With this command you can "copy" the content of the Array to an Listview control.
Rex Posted February 21, 2015 Posted February 21, 2015 (edited) Hi found a small bug, at least i think it's bug I have set a hot key for AutoIt3Wrapper.exe, like in SciTE Ctrl+F7, that works swell - starts the wrapper and all, but after compiling my exe file, the scripts refreshes and all data typed after last save is gone Hmm also had the problem when running tidy, all my new code is gone Cheers /Rex Edited February 21, 2015 by Rex
ImOracle Posted February 22, 2015 Posted February 22, 2015 Local Variables arent shown in syntax highlighting, not sure if this was already reportet.
jorgev Posted February 22, 2015 Posted February 22, 2015 (edited) Hello, Thankyou very much for your much appriciated work. I have just a little problem with the following: Im using an .isf file for my gui. In there i created some piccontrols, have them a handle(actually it's a control ID in this case), then checked the 'global' radiobutton in the 'Declaration for handles'(thats in the gui properties) The problem: the control ID, well the variable that holds it, isn't available in my main script. Don't know if someone else is also having this prob? Edit: i would expect them to be available after the include ( #include "GuiGuiMain.isf") or else after GUISetState(@SW_SHOW, $hwMainGui) since the gui and its controls are made and displayed, but i cant access the control id of my picturecontrol. if i check inside the .isf file how my control is declared: Global $idPic1 = GUICtrlCreatePic(@scriptdir&""&"",30,30,200,200,-1,-1) "$idPic1" should be available in my main script after "GUISetState(@SW_SHOW, $hwMainGui)" for sure? EDIT 2 : It might be a bug? I tested this with a label => no problem, dont know for other controls Edit 3(Final): Ok i got it, the piccontrols where never created, looks like the default value (by ISN) for "filename" prevents the creation of the piccontrol. The default value => @scriptdir&""&"" Edited February 22, 2015 by jorgev
ISI360 Posted February 23, 2015 Author Posted February 23, 2015 @Rex: Ohh..damned. Thx for the info. This is a crittical bug. I will fix it in the next update. @ImOracle: I´m not really sure what you meaning. @jorgev: Your problem was that you do not select an image for the control in the formstudio. But yes its a bug. The control sould also be created witout an image. I will fix it.
ckelsoe Posted February 23, 2015 Posted February 23, 2015 ISN AutoIt Studio has a large following. Is there any way that it can get it's own forum section so we can have smaller threads that are on topic? This one thread is quite large and difficult to find information quickly.
Recommended Posts