Jump to content

ISN AutoIt Studio [old thread]


ISI360
 Share

Recommended Posts

So i thing i found a litte bug. I just released a new hotfix update. Please do the following:

- Update the ISN (to build 20160308)
- Set the setting in the registry to your wanted value "edit" (at HKEY_CURRENT_USER\SOFTWARE\Classes\AutoIt3Script\Shell)
- Start the ISN and it should not overwritte the settings anymore

Hope it helps!

Link to comment
Share on other sites

  • Developers

Just had a look at your project and seems you have invested quite some time. :)

Looking at your distributed zip file I was wondering why you are repacking utilities that are provided with the AutoIt3 and SciTE4AutoIt3 installers?
Wouldn't it MUCH simpler to make use of the default installers and just add on to them to stick with their standards and avoid re-distribution?

I am also wondering what users of your form designer think about its capabilities and whether it has the potential to replace Koda?

Jos 

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Hi Jos!

Thanks for your feedback!

Of course you are right about the executables. Actually, I do not know why I've done it this way when i started with the ISN many years ago...
Would be a big point for the next update.

Hm maybe. There are many GUI Designers out there at the time. Each with its front and disad- vantages.

Link to comment
Share on other sites

I wish these features in ISN AutoIt Studio;

1. Why using ".*isf" file ?. It should be create an au3 file. (I know i can create au3 from gui designer, but i am talking about default output format of code generator in gui designer should be au3)

2. When we click on the menu item - Create new file --> New GUI file, there the au3 code tab of the gui should appear. If gui designer opens with a bare form, then the code tab contains only the code to show the bare form. And later if user adds more controls to the form, the code tab automatically update it's code as per the form. So a user can change the gui either by dragging controls with mouse or by changing code in the code tab. That will be a great advantage. 

3. If we open an already created gui script, ISN should automatically show the gui from the code and give features said in number 2 (above)

4. When the user is working with form designer, if he wants to add code to any control, he should be able to do this;

   a) Double click on the control and then a small window will be open.

    b.) It should be display all events related to that control. (Probably in a combo box. A little discription about the event will be helpful for the newbies)

    c) When the user selects the event, then the code tab should be on focus and the function header should be pasted automatically. (like - "Func ControlName_EventName () \n\n\n EndFunc"). And the cursor rests inside the function blobk. In addition to this, appropriate code should be added to the message loop. (like - "Case That purticular event \n\t Function name")

A last word. These are my wishes. I know you are investing your precious time to this project. I am posting this here because, if you have time to develop more features to ISN, then please consider this. :) 

Edit

Like in the visual studio, the code related to gui cration and control creation should be in one au3 file. And msg loop and functions for the controls and form are in a separate au3 file.  So user has the ease of access. 

Edited by kcvinu
Spoiler

My Contributions

Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language.

UDF Link Viewer   --- A tool to visit the links of some most important UDFs 

 Includer_2  ----- A tool to type the #include statement automatically 

 Digits To Date  ----- date from 3 integer values

PrintList ----- prints arrays into console for testing.

 Alert  ------ An alternative for MsgBox 

 MousePosition ------- A simple tooltip display of mouse position

GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function

Access_UDF  -------- An UDF for working with access database files. (.*accdb only)

 

Link to comment
Share on other sites

Also, anyone who wants to customize their own style you can't use any of the style builders that are out there. You can use ResourceHacker to edit a pre-exisint XP style (msstyles file that was made for windows xp, not windows vista and above) or you can make your own using  TGT Soft StyleBuilder. I couldn't get it to work on Windows 7, lots of missing files and wouldn't work. I made a virtual box with XP and it is working just fine.

Link to comment
Share on other sites

On 8/3/2016 at 11:03 PM, Jos said:

I am also wondering what users of your form designer think about its capabilities and whether it has the potential to replace Koda?

I agree that it has potential, just needs some polishing.

EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time)

DcodingTheWeb Forum - Follow for updates and Join for discussion

Link to comment
Share on other sites

@ISI360,

I would like to know about how to drag and resize controls on a form. Can you just give me a hint (i mean line number) in your source code so that i can find and read the section where you wrote code for moving controls in a form and resize them. 

 

Spoiler

My Contributions

Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language.

UDF Link Viewer   --- A tool to visit the links of some most important UDFs 

 Includer_2  ----- A tool to type the #include statement automatically 

 Digits To Date  ----- date from 3 integer values

PrintList ----- prints arrays into console for testing.

 Alert  ------ An alternative for MsgBox 

 MousePosition ------- A simple tooltip display of mouse position

GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function

Access_UDF  -------- An UDF for working with access database files. (.*accdb only)

 

Link to comment
Share on other sites

The "drag" magic happens in the _DragMe() function (orginal from ChaosKeks) in the Addons.au3 (line 1070). It uses the Variable $Markiertes_Control_ID to get the handle of the selected control. Triggered is this function from the main "while" loop directly from the formstudio2.au3.

The resizing thing is splitted into several functions. When you select a control the formstudio create dots around the control. Each dot is a simple Picture witch an Guictrlsetonevent on it. For Example the upper left dot uses the func _Resize_Control_Oben_Links() to resize the control. (Addons.au3, line 326) So for every dot ther is a own func.
So if you click on the dot, the func is triggered and you can resize the control. (The funcs use again $Markiertes_Control_ID to get the handle of the current selected control)

Edited by ISI360
Link to comment
Share on other sites

@ISI360 ,

Thank you for the reply. I will sure check those functions. And What is the magic behind the grid matching lines ?. I mean when you drag a control over the form, if it is happen to be in the same x pos or y pos of another control, then a green line will be displayed. How did that happens  ? Is that GDI+ ?

Spoiler

My Contributions

Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language.

UDF Link Viewer   --- A tool to visit the links of some most important UDFs 

 Includer_2  ----- A tool to type the #include statement automatically 

 Digits To Date  ----- date from 3 integer values

PrintList ----- prints arrays into console for testing.

 Alert  ------ An alternative for MsgBox 

 MousePosition ------- A simple tooltip display of mouse position

GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function

Access_UDF  -------- An UDF for working with access database files. (.*accdb only)

 

Link to comment
Share on other sites

This "dock" technique is already included n the _DragMe or the _Resize_Control_Oben_Links function. At first it calls _Positionsarray_aller_Controls_aufbauen() to create an array wit positions of all the controls in the form. Then "while you drag, or resize the control" it checkes with _Pruefe_Ob_Control_an_anderes_andockt if a position "docks" to an other control and displays the line(s). The Line what you see is an simple Lable control with 1px height. :P (Yeah i know GDI+ would be better :P :P)

Edited by ISI360
Link to comment
Share on other sites

@ISI360 , Thanks and interesting.  Programmers do things in their own way. Sometimes, its interesting how they did stuff like the above said label lines. I remember, the guy who wrote "FormBuilder" (A nice gui tool) wrote a udf for right click context menu. This is the scenario

1. He made a border less popus gui first.

2. And create a few labels with these text - "Copy, Cut, Select All" etc.

3. And create some labels with light blue back color and set them hide. These labels are in the same position of Copy, cut labels.

4. Then he checks for GUIGetCursorInfo function. Then he will know in which label the mouse hovers. 

5. He then, show the light blue label on that purticular label's position. So the user will see a selection area behind the "Cut" or "Copy" text. 

6. If the user clicks on that label, this function will return a specific number. (Cut = 1, Copy = 2 ..... Select All = 4)

How brilliant is this. But unfortunatey, he can't add this feature to his projoect because he is busy. 

Spoiler

My Contributions

Glance GUI Library - A gui library based on Windows api functions. Written in Nim programming language.

UDF Link Viewer   --- A tool to visit the links of some most important UDFs 

 Includer_2  ----- A tool to type the #include statement automatically 

 Digits To Date  ----- date from 3 integer values

PrintList ----- prints arrays into console for testing.

 Alert  ------ An alternative for MsgBox 

 MousePosition ------- A simple tooltip display of mouse position

GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function

Access_UDF  -------- An UDF for working with access database files. (.*accdb only)

 

Link to comment
Share on other sites

Quick question.  Sorry if it is a stupid one, but, while your tool is unique and awesome, it is soo different than what I am used to.  I have a form I built using form studio:

; -- Created with ISN Form Studio 2 for ISN AutoIt Studio -- ;
#include <StaticConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Include <GuiButton.au3>
#include <GuiTab.au3>
#include <EditConstants.au3>

$Wim_Tools = GUICreate("Wim Tools",547,599,-1,-1,BitOr($WS_POPUP,$WS_CAPTION,$WS_SYSMENU,$WS_MAXIMIZEBOX,$WS_MINIMIZEBOX,$WS_VISIBLE,$DS_SETFOREGROUND),-1)
$tab = GUICtrlCreatetab(20,41,506,525,-1,-1)
GuiCtrlSetState(-1,2048)
GUICtrlSetState(-1,$GUI_SHOW)
$tab = GUICtrlCreateTabItem("Mount/Dismount wim")
$tab = GUICtrlCreateTabItem("Driver tasks")
GUICtrlCreateTabItem("Package tasks")
GUICtrlCreateTabItem("")
_GUICtrlTab_SetCurFocus($tab,-1)
GUISwitch($Wim_Tools,_GUICtrlTab_SetCurFocus($tab,0)&GUICtrlRead ($tab, 1))
$edit1 = GUICtrlCreateInput("Browse for wim file...",40,125,302,30,$ES_READONLY,$WS_EX_CLIENTEDGE)
GUICtrlSetState(-1,BitOr($GUI_SHOW,$GUI_ENABLE,$GUI_ONTOP))
GUICtrlSetFont(-1,12,400,0,"MS Sans Serif")
$button1 = GUICtrlCreateButton("Browse",380,125,100,30,-1,-1)
GUICtrlSetOnEvent(-1,"wimFind")
GUICtrlSetState(-1,BitOr($GUI_SHOW,$GUI_ENABLE,$GUI_ONTOP))
$label1 = GUICtrlCreateLabel("Browse and select wim",118,84,262,26,-1,-1)
GUICtrlSetFont(-1,21,400,0,"MS Sans Serif")
GUICtrlSetBkColor(-1,"-2")
_GUICtrlTab_SetCurFocus($tab,0)

This is the generated code.  In the main file I have so far:

Do
#include "Forms\Wim Tools.isf"
GUISetState ( @SW_SHOW, $Wim_Tools )
Func wimFind ()
    $openfile = FileOpenDialog ( 'Select your "wim" file', @DesktopDir, "Windows image files (*.wim)", 1, "", $Wim_Tools )
        If $openfile = "" Then
            Return SetError (6)
        Else
            Return $openfile    
        EndIf
EndFunc
Until GUIGetMsg () = $GUI_EVENT_CLOSE

Not much but just getting started.  However, when I try to compile and test, the GUI flickers in and out of existence in less than a second.  What am I doing wrong?

Link to comment
Share on other sites

Several things are wrong with that.

1) You have an include inside the loop

2) you have a function inside the loop, which isn't allowed

3) You have a GUISetState inside the loop, so it's going to cause display issues.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

3 hours ago, BrewManNH said:

Several things are wrong with that.

1) You have an include inside the loop

2) you have a function inside the loop, which isn't allowed

3) You have a GUISetState inside the loop, so it's going to cause display issues.

So just get rid of the loop is what I gather from that.  I am familiar with how to make GUIs with the regular Scite editor.  I'm just trying to connect the dots on how it works for this tool.  It seems to be, by default, set to SetonEventMode.  Is this the case?  If someone wouldn't mind posting a sample project so that I could follow the series of events, that would help immensely. 

pic.png

Link to comment
Share on other sites

Ran into some unexpected behavior when trying to create tab pages and content within tab pages in ISN Autoit.  When I run the gui to test it out, the "input" portion of the updown control does not appear and neither does the label control (ign1).  However, if I navigate to a different tab page then navigate back to the original tab page, it displays like I want it to (ign2).  I have included the compiled code, but I am pretty sure I using ISN AutoIT studio correctly, so could this be a bug?

; -- Created with ISN Form Studio 2 for ISN AutoIt Studio -- ;
#include <StaticConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Include <GuiButton.au3>
#include <UpDownConstants.au3>
#include <GuiTab.au3>
#include <EditConstants.au3>

$GUIP = GUICreate("GUI",705,788,-1,-1,BitOr($WS_POPUP,$WS_CAPTION,$WS_SYSMENU,$WS_MAXIMIZEBOX,$WS_MINIMIZEBOX,$WS_VISIBLE),-1)
$tab = GUICtrlCreatetab(30,90,637,676,$TCS_FOCUSONBUTTONDOWN,-1)
GuiCtrlSetState(-1,2048)
GUICtrlSetState(-1,BitOr($GUI_SHOW,$GUI_ENABLE,$GUI_FOCUS))
$tab1 = GUICtrlCreateTabItem("Mount/unmount")
$tab2 = GUICtrlCreateTabItem("package management")
$tab3 = GUICtrlCreateTabItem("driver management")
GUICtrlCreateTabItem("")
_GUICtrlTab_SetCurFocus($tab,-1)
GUISwitch($GUIP,_GUICtrlTab_SetCurFocus($tab,0)&GUICtrlRead ($tab, 1))
$Input1 = GUICtrlCreateInput("Browse for wim file or drag and drop here...",70,190,413,36,BitOr($ES_READONLY,$ES_NOHIDESEL,$ES_OEMCONVERT),BitOr($WS_EX_CLIENTEDGE,$WS_EX_ACCEPTFILES))
GUICtrlSetState(-1,BitOr($GUI_SHOW,$GUI_ENABLE,$GUI_ONTOP,$GUI_DROPACCEPTED))
GUICtrlSetFont(-1,12,400,0,"MS Sans Serif")
$Button1 = GUICtrlCreateButton("Browse",510,190,88,34,$BS_NOTIFY,-1)
GUICtrlSetState(-1,BitOr($GUI_SHOW,$GUI_ENABLE,$GUI_FOCUS,$GUI_ONTOP))
GUICtrlSetFont(-1,12,400,0,"MS Sans Serif")
$up = GUICtrlCreateInput("0",100,280,50,20, -1,$WS_EX_CLIENTEDGE)
GUICtrlSetState(-1,BitOr($GUI_SHOW,$GUI_ENABLE,$GUI_ONTOP))
$up_Updown = GUICtrlCreateUpdown(-1,-1)
$Label1 = GUICtrlCreateLabel("Browse for wim",250,130,149,33,$SS_SUNKEN,-1)
GUICtrlSetState(-1,BitOr($GUI_SHOW,$GUI_ENABLE,$GUI_ONTOP))
GUICtrlSetFont(-1,16,400,0,"MS Sans Serif")
GUICtrlSetBkColor(-1,"-2")
_GUICtrlTab_SetCurFocus($tab,0)

 

ign2.png

ign.png

Link to comment
Share on other sites

  • Jos locked this topic
Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...