Jump to content

Format strings


Go to solution Solved by JockoDundee,

Recommended Posts

  • Developers
7 minutes ago, XGamerGuide said:

I have more plans for my program than what Tidy can do :)

... curious what that is going to be.... :) 

So, what exactly is the purpose of the compress function you are trying to make?

1 hour ago, XGamerGuide said:

After compression, the script should only be read by the Autoit interpreter and no longer by programmers. This makes the file smaller

So this is not the same as Au3Stripper functionality either?

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

1 hour ago, jchd said:

Isn't that (and more) that #AutoIt3Wrapper_Run_Au3Stripper=y would do?

1 hour ago, Jos said:

So this is not the same as Au3Stripper functionality either?

Sure ! but it seems that it may be sometimes gratifying to reinvent the wheel  :D

Link to comment
Share on other sites

  • Developers
6 minutes ago, mikell said:

Sure ! but it seems that it may be sometimes gratifying to reinvent the wheel  :D

sure, well I can guarantee that is a lot of fun to modify working source files and ensure the still function after being processed by the utility!  

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

Quote

Sure ! but it seems that it may be sometimes gratifying to reinvent the wheel  :D

Yeah, I just do it for fun. In the meantime I have decided to use Au3Wrapper and to repair the functions that are not working. For example HotKeySet(). Also, I'll do things like

If 1 Then
    ; My Code
EndIf

to

If 1 Then ; My Code

and other things

Link to comment
Share on other sites

  • Developers
40 minutes ago, XGamerGuide said:

In the meantime I have decided to use Au3Wrapper and to repair the functions that are not working.

Excuse me ....  what exactly is not working?

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

Quote

Excuse me ....  what exactly is not working?

Quote

A function takes a literal string parameter defining a function or variable.  In this case the resulting string might not be able to be correctly linked to the correct variable or function name during the process.  This only affects certain AutoIt3 functions:

AdlibRegister()
AdlibUnRegister()
Call()
Eval()
Execute()
GUIRegisterMsg()
GUISetOnEvent()
GUICtrlSetOnEvent()
TrayItemSetOnEvent()
HotKeySet()
IsDeclared()
ObjEvent()

I'll match the original with the Stripers' result

Link to comment
Share on other sites

  • Developers

I am totally at loss what you are on about so wish you luck on your endeavor as I have no idea what the purpose is of all of this. 

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

  • Solution
41 minutes ago, XGamerGuide said:

“A function takes a literal string parameter defining a function or variable.  In this case the resulting string might not be able to be correctly linked to the correct variable or function name during the process.  This only affects certain AutoIt3 functions:”

So in cases like this

$a= "sVar"
$b = "50
Eval($a & $b)

you would be able to say that the Eval() statement contains a valid reference or not?

Keep dreaming…

 

Code hard, but don’t hard code...

Link to comment
Share on other sites

Quote

I am totally at loss what you are on about

As far as I know, Stripper does not support functions that have a variable or other function in a string when renaming variables. This includes, for example, HotKeySet(). I will change that in my program.
Link to comment
Share on other sites

  • Developers
31 minutes ago, XGamerGuide said:

As far as I know, Stripper does not support functions that have a variable or other function in a string when renaming variables. This includes, for example, HotKeySet(). I will change that in my program.

Are you sure?   As said...good luck with your project and am sincerely interested in the outcome knowing what is involved to make the basics work. :)

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

Quote

Are you sure?

 

#Au3Stripper_Parameters=/RenameMinimum

HotKeySet("{Space}", "_test")

Func _test()
    MsgBox(0+64, "Test", "Test")
    Exit
EndFunc

While 1
    sleep(1000)
WEnd

This is going to be

HotKeySet("{Space}", "_test")
Func _0()
MsgBox(0+64, "Test", "Test")
EndFunc
While 1
sleep(1000)
WEnd

The script below gives an error. I will program that _test will also be changed to _0.

 

I will also add something like that:

If InputBox("", "Input:") = "test" Then
    ConsoleWrite( "Test" & @CRLF )
EndIf
$i = 0
While $i < 10
    $i = $i + 1
    ConsoleWrite( $i & @CRLF )
WEnd

This is going to be

If InputBox("","Input:")="test" Then ConsoleWrite("Test"&@CRLF)
$i=0
While $i<10
    $i+=1
    ConsoleWrite($i&@CRLF)
WEnd

Why do I want it to be as small as possible? My program will have a function to encode the code base64. Large programs in base64 take some time to decode. I would like to shorten this here. When it's ready I'll publish it here

Link to comment
Share on other sites

Why not that?

#Au3Stripper_Parameters=/RenameMinimum

HotKeySet("{Space}", _test)

Func _test()
    MsgBox(0+64, "Test", "Test")
    Exit
EndFunc

While 1
    sleep(1000)
WEnd

 

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Link to comment
Share on other sites

  • Developers

So what again is wrong with the current Au3Stripper output?

HotKeySet("{Space}", "_0")
Func _0()
MsgBox(0 + 64, "Test", "Test")
Exit
EndFunc
While 1
Sleep(1000)
WEnd

Try giving me a simple example of your input, the au3strippers output and the things you feel still needs changing to that output so it is easy for others to follow its goals. ;) 

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

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...