Jump to content

Recommended Posts

Posted

  On 9/13/2010 at 1:23 AM, 'Ashalshaikh said:

Of course .. Such a great idea

I will add this in the new version ;)

Thanks ! Posted Image

and i will dare ask too :

add the possibility to resize your gui on the height of screen ?

Thanks in advance ! Posted Image

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

  • Replies 77
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • Moderators
Posted

Ashalshaikh,

This is developing nicely - but may I offer another small suggestion? ;)

A user anchor is placed exactly at the cursor position - even if the cursor is in the middle of a line, in which case it splits the line and the script fails to run. ;)

It would be better if you forced the cursor to the margin before inserting the anchor text, thus leaving the line intact.

As a simple example of how it might then work, I amended your _SciTEInsertText function as follows:

Func _SciTEInsertText($DataToInsert)
    WinActivate("[CLASS:SciTEWindow]") ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<
    Send("{HOME}")                     ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<
    Opt("WinSearchChildren", 1)
    Local $Scite_hwnd = WinGetHandle("DirectorExtension")
    $DataToInsert = StringReplace($DataToInsert, "\", "\\")
    $DataToInsert = StringReplace($DataToInsert, @TAB, "\t")
    $DataToInsert = StringReplace($DataToInsert, @CRLF, "\r\n")
    _SciTE_Send_Command(0, $Scite_hwnd, "insert:" & $DataToInsert)
EndFunc   ;==>_SciTEInsertText

But of course, you might prefer to use another method. :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

  Reveal hidden contents

 

Posted (edited)

  On 9/13/2010 at 6:08 AM, 'wakillon said:

Thanks ! Posted Image

and i will dare ask too :

o:) Your suggestions Make (The Jumper o:) ) Better !!

Please, if you remembered any other idea , write it here

  On 9/13/2010 at 6:08 AM, 'wakillon said:

add the possibility to resize your gui on the height of screen ?

Thanks in advance ! Posted Image

this will make Hopper easier to use .. Good !!

I will try to do this .. But not by the window borders ;)

New version pictures

http://img245.imageshack.us/img245/7866/20100913173401.gif

http://img442.imageshack.us/img442/6437/20100913174007.gif

Very Soon :D

------------------------------------

  On 9/13/2010 at 9:45 AM, 'Melba23 said:

Ashalshaikh,

This is developing nicely - but may I offer another small suggestion? :)

thanks !

Sure !!

  On 9/13/2010 at 9:45 AM, 'Melba23 said:

A user anchor is placed exactly at the cursor position - even if the cursor is in the middle of a line, in which case it splits the line and the script fails to run. :(

:P I will not know this .. Amazing ;)

  On 9/13/2010 at 9:45 AM, 'Melba23 said:

It would be better if you forced the cursor to the margin before inserting the anchor text, thus leaving the line intact.

As a simple example of how it might then work, I amended your _SciTEInsertText function as follows:

Func _SciTEInsertText($DataToInsert)
    WinActivate("[CLASS:SciTEWindow]") ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<
    Send("{HOME}")                     ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<
    Opt("WinSearchChildren", 1)
    Local $Scite_hwnd = WinGetHandle("DirectorExtension")
    $DataToInsert = StringReplace($DataToInsert, "\", "\\")
    $DataToInsert = StringReplace($DataToInsert, @TAB, "\t")
    $DataToInsert = StringReplace($DataToInsert, @CRLF, "\r\n")
    _SciTE_Send_Command(0, $Scite_hwnd, "insert:" & $DataToInsert)
EndFunc   ;==>_SciTEInsertText

That is simple and practical solution !!

  On 9/13/2010 at 9:45 AM, 'Melba23 said:

But of course, you might prefer to use another method. :party:

M23

Sure . I will use Send("{END}") !! :D

I will try some ideas ..

Thanks M23

Edited by Ashalshaikh
Posted (edited)

Nice work Ashalshaikh!  ;) 

A suggestion: try to modify line 249 (to get rid of the black background of the icons in the treeview)

$TVImage = _GUIImageList_Create(16, 16)

with this

$TVImage = _GUIImageList_Create(16, 16, 5)

M.I.

  Quote

Also if this reaches final it would be so great to be included in Scite4AutoIt3

I agree! Edited by taietel

Things you should know first...In the beginning there was only ONE! And zero...

Progs:

  Reveal hidden contents
Create PDF(TXT2PDF,IMG2PDF) 3D Bar Graph DeskGadget Menu INI Photo Mosaic 3D Text
Posted (edited)

And another suggestion which is more as a cosmetic feature is adding #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 to the top of the Script as this will check if variables are correctly used within the script. When I check I noticed smeo variables had been declared with a 'Local' specifier in a 'Global' scope. Also some of the functions have declared variables but aren't used at all in the function!

Also if this reaches final it would be so great to be included in Scite4AutoIt3 ;)

Edited by guinness

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Posted (edited)

  On 9/13/2010 at 3:25 PM, 'taietel said:

Nice work Ashalshaikh!  :) 

A suggestion: try to modify line 249 (to get rid of the black background of the icons in the treeview)

$TVImage = _GUIImageList_Create(16, 16)

with this

$TVImage = _GUIImageList_Create(16, 16, 5)

M.I.

I just forgot about that

Now, the Hopper has become better ;)

Thanks ..

  On 9/13/2010 at 4:02 PM, 'guinness said:

And another suggestion which is more as a cosmetic feature is adding #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 to the top of the Script as this will check if variables are correctly used within the script. When I check I noticed smeo variables had been declared with a 'Local' specifier in a 'Global' scope. Also some of the functions have declared variables but aren't used at all in the function!

thank for suggestion ..

I was planning to do this in the end

But I will do it now .. Thanks! :P

  On 9/13/2010 at 4:02 PM, 'guinness said:

Also if this reaches final it would be so great to be included in Scite4AutoIt3 o:)

  On 9/13/2010 at 3:25 PM, 'taietel said:

I agree!

I hope so ;) Edited by Ashalshaikh
  • Moderators
Posted

All,

Once Ashalshaikh has a release version ready, it is very easy to incorporate it into the SciTE <Tools> menu - it does not have to be part of the main package in order to do this. :)

Remind me to tell you how to do it when the time comes. ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

  Reveal hidden contents

 

Posted

Really liked! ;):)

Couples of things:

- Why there is a 'Go there" button? It already works fine just by clicking in any function/region. ;)

- Sometimes goes to the line showing the function/region at bottom of screen and sometimes it shows at top of screen. It is supposed to show only at the top of the screen?

Posted

That's a great idea Ashalshaikh,

however i get an error when I switch from one Tab to another Tab while your script is running...

here is the error message:

>"C:\Program Files\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "C:\Documents and Settings\Artan\Desktop\SciTE Hopper.au3" 
C:\Documents and Settings\Artan\Desktop\SciTE Hopper.au3 (423) : ==> Subscript used with non-Array variable.: 
For $x = 1 To $FileLines[0] 
For $x = 1 To $FileLines^ 
ERROR >Exit code: 1 Time: 1.549

........??

Posted (edited)

Updated the first post in 19 September 2010

Version 0.1!!

  On 9/14/2010 at 12:13 PM, 'SeF said:

Really liked! ;):)

Couples of things:

- Why there is a 'Go there" button? It already works fine just by clicking in any function/region. ;)

- Sometimes goes to the line showing the function/region at bottom of screen and sometimes it shows at top of screen. It is supposed to show only at the top of the screen?

thanks o:)

- becouse : Jump twice to the same anchor زز

- Been Fixed in the new version !! :P thanks ..

  On 9/17/2010 at 12:56 PM, 'ALTIN said:

That's a great idea Ashalshaikh,

however i get an error when I switch from one Tab to another Tab while your script is running...

here is the error message:

>"C:\Program Files\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "C:\Documents and Settings\Artan\Desktop\SciTE Hopper.au3" 
C:\Documents and Settings\Artan\Desktop\SciTE Hopper.au3 (423) : ==> Subscript used with non-Array variable.: 
For $x = 1 To $FileLines[0] 
For $x = 1 To $FileLines^ 
ERROR >Exit code: 1 Time: 1.549

........??

Thank you for reporting o:)

Been Fixed in the new version !!

Edited by Ashalshaikh
Posted

Last version works well but gives me lot of warning ! Posted Image

SciTE Hopper.au3(365,69) : WARNING: $IcnLbl1: declared, but not used in func.
    Local $IcnLbl1 = GUICtrlCreateLabel("User Icon : ", 40, 64, 59, 17)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\Administrateur\Bureau\SciTE Hopper 0.1 (1)\SciTE Hopper.au3(366,62) : WARNING: $IcnLbl6: declared, but not used in func.
    Local $IcnLbl6 = GUICtrlCreateLabel("File", 104, 64, 20, 17)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\Administrateur\Bureau\SciTE Hopper 0.1 (1)\SciTE Hopper.au3(368,64) : WARNING: $IcnLbl11: declared, but not used in func.
    Local $IcnLbl11 = GUICtrlCreateLabel("index", 312, 64, 29, 17)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\Administrateur\Bureau\SciTE Hopper 0.1 (1)\SciTE Hopper.au3(370,69) : WARNING: $IcnLbl2: declared, but not used in func.
    Local $IcnLbl2 = GUICtrlCreateLabel("Func Icon : ", 40, 88, 61, 17)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\Administrateur\Bureau\SciTE Hopper 0.1 (1)\SciTE Hopper.au3(371,62) : WARNING: $IcnLbl7: declared, but not used in func.
    Local $IcnLbl7 = GUICtrlCreateLabel("File", 104, 88, 20, 17)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\Administrateur\Bureau\SciTE Hopper 0.1 (1)\SciTE Hopper.au3(373,64) : WARNING: $IcnLbl12: declared, but not used in func.
    Local $IcnLbl12 = GUICtrlCreateLabel("index", 312, 88, 29, 17)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\Administrateur\Bureau\SciTE Hopper 0.1 (1)\SciTE Hopper.au3(376,65) : WARNING: $IcnLbl13: declared, but not used in func.
    Local $IcnLbl13 = GUICtrlCreateLabel("index", 312, 112, 29, 17)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\Administrateur\Bureau\SciTE Hopper 0.1 (1)\SciTE Hopper.au3(378,63) : WARNING: $IcnLbl8: declared, but not used in func.
    Local $IcnLbl8 = GUICtrlCreateLabel("File", 104, 112, 20, 17)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\Administrateur\Bureau\SciTE Hopper 0.1 (1)\SciTE Hopper.au3(379,70) : WARNING: $IcnLbl3: declared, but not used in func.
    Local $IcnLbl3 = GUICtrlCreateLabel("Region Icon ", 40, 112, 65, 17)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\Administrateur\Bureau\SciTE Hopper 0.1 (1)\SciTE Hopper.au3(381,65) : WARNING: $IcnLbl14: declared, but not used in func.
    Local $IcnLbl14 = GUICtrlCreateLabel("index", 312, 135, 29, 17)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\Administrateur\Bureau\SciTE Hopper 0.1 (1)\SciTE Hopper.au3(383,63) : WARNING: $IcnLbl9: declared, but not used in func.
    Local $IcnLbl9 = GUICtrlCreateLabel("File", 104, 135, 20, 17)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\Administrateur\Bureau\SciTE Hopper 0.1 (1)\SciTE Hopper.au3(384,70) : WARNING: $IcnLbl4: declared, but not used in func.
    Local $IcnLbl4 = GUICtrlCreateLabel("Item Icon : ", 40, 135, 57, 17)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\Administrateur\Bureau\SciTE Hopper 0.1 (1)\SciTE Hopper.au3(385,70) : WARNING: $IcnLbl5: declared, but not used in func.
    Local $IcnLbl5 = GUICtrlCreateLabel("Result Icon:", 39, 159, 61, 17)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\Administrateur\Bureau\SciTE Hopper 0.1 (1)\SciTE Hopper.au3(386,64) : WARNING: $IcnLbl10: declared, but not used in func.
    Local $IcnLbl10 = GUICtrlCreateLabel("File", 103, 159, 20, 17)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\Administrateur\Bureau\SciTE Hopper 0.1 (1)\SciTE Hopper.au3(388,65) : WARNING: $IcnLbl15: declared, but not used in func.
    Local $IcnLbl15 = GUICtrlCreateLabel("index", 311, 159, 29, 17)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Documents and Settings\Administrateur\Bureau\SciTE Hopper 0.1 (1)\SciTE Hopper.au3 - 0 error(s), 15 warning(s)
->15:56:05 AU3Check ended.rc:1

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Posted (edited)

  On 9/20/2010 at 2:00 PM, 'wakillon said:

Last version works well but gives me lot of warning ! Posted Image

Erros

  Reveal hidden contents

Thanks for test ..

yes .. This happens because of the use of variables in some other way :-

For $x = 1 To 15
            GUICtrlSetState(Execute('$IcnLbl' & $x), $GUI_Disable)
        Next
        For $x = 1 To 5
            GUICtrlSetState(Execute('$IcnIdxInp' & $x), $GUI_Disable)
        Next
        For $x = 1 To 5
            GUICtrlSetState(Execute('$IcnFLInp' & $x), $GUI_Disable)
        Next

It work like 25 line !!

just remove #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 to fix it !! ;)

Edited by Ashalshaikh
  • Moderators
Posted

Ashalshaikh,

Very nice.

Here is how to incorporate SciTE Hopper into SciTE: ;)

- Open <Options - Open au3.properties>. Look for the long series of "command" lines that begin about Line 67 (#x 00 Beta RUN) and go down to the last one - for me it is Line 268 (#~ #x 33 Open BETA #include File). We need to find the highest value used so far - 33 in my case.

-Open <Options - User Options File>. Then BETWEEN the following lines:

# END => DO NOT CHANGE ANYTHING BEFORE THIS LINE #-#-#-#-#-#

>>>>>>>>>>> in here!!!! <<<<<<<<<<<<<

#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#

# START: DO NOT CHANGE ANYTHING AFTER THIS LINE #-#-#-#-#

you enter the following:

# 34 Hopper

command.34.$(au3)="$(SciteDefaultHome)\SciTE Utils\SciTE Hopper.exe"

command.name.34.$(au3)=SciTE Hopper

command.subsystem.34.$(au3)=2

command.save.before.34.$(au3)=2

command.quiet.34.$(au3)=1

If you have a higher value for the final "command" in the au3.properties file than adjust the 34 value accordingly. I have created a folder inside the normal SciTE folder called "SciTE Utils" (because I have quite a few of my own utils in there!) - you can obviously put the compiled Hopper exe file where you want and amend the path in the inserted text.

- Save the files, restart SciTE and you will find "SciTE Hopper" in the <Tools> menu. :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

  Reveal hidden contents

 

Posted (edited)

Melb32

Thanks

Very nice ..

Thank you .. This explanation is very great ;)

Has been applied and worked Excellent

I'm planning to add a button to do this :)

It will be in the Help File later

Edited by Ashalshaikh
Posted (edited)

@Melba23

why not place your

# 34 Hoppercommand.34.$(au3)="$(SciteDefaultHome)\SciTE Utils\SciTE Hopper.exe"

command.name.34.$(au3)=SciTE Hopper

command.subsystem.34.$(au3)=2

command.save.before.34.$(au3)=2

command.quiet.34.$(au3)=1

after #33... in au3.properties like this ;

#x 33 Open BETA #include File

if BETA_AUTOIT

command.name.33.$(au3)=Open Include Beta

command.mode.33.$(au3)=subsystem:lua,savebefore:no

command.shortcut.33.$(au3)=Alt+Shift+I

command.33.$(au3)=InvokeTool AutoItTools.OpenBetaInclude

# 34 Hopper

command.34.$(au3)="$(SciteDefaultHome)\SciTE Utils\SciTE Hopper.exe"

command.name.34.$(au3)=SciTE Hopper

command.subsystem.34.$(au3)=2

command.save.before.34.$(au3)=2

command.quiet.34.$(au3)=1

# Commands to for Help F1

It seems to work...

or I yet forgot something ! Posted Image

Edited by wakillon

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

  • Moderators
Posted

wakillon,

If you place the lines directly in au3.properties, they will be overwritten when you install the next version of SciTE. If you put them in SciTEUSer.properties, they will not be. ;)

The recommendation is to use SciTEUser.properties to alter any of the preset au3.properties values - my SciTEUser file is quite large. ;) By the way, you do not have to remove the original from au3.properties, SciTE sorts it all out as it loads. :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

  Reveal hidden contents

 

Posted

  On 9/19/2010 at 10:35 PM, 'Ashalshaikh said:

thanks :P

- becouse : Jump twice to the same anchor زز

- Been Fixed in the new version !! ;) thanks ..

Nice! =)

Now goes to the middle of the screen. ;)

But, #Region jumps are not working :)

I use it to organize different type of functions, like:

#Region  Function Type 1

Func Function1()
    ; Stuffs
EndFunc   ;==>Function1

Func Function2()
    ; Stuffs
EndFunc   ;==>Function2

#EndRegion  Function Type 1


#Region  Function Type 2

Func Function3()
    ; Stuffs
EndFunc   ;==>Function3

Func Function4()
    ; Stuffs
EndFunc   ;==>Function4

#EndRegion  Function Type 2

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
  • Recently Browsing   0 members

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