Sign in to follow this  
Followers 0
DirtDBaK

Web Based AutoIT - HTML Form UDF

27 posts in this topic

#1 ·  Posted (edited)

Not for AuCGI, for AutoIT3.exe as interperter...

You'll need abyss web server!

<b>WebGui.au3</b>

[autoit];Created by DBak

Func _WebGuiCreateInput( $CTRL_ID, $Int_Val ='',$I_Size = '', $I_MaxChr = '', $I_Method = 'Post' )

echo('<form action="'&$_SCRIPT_NAME&'" method="'& $I_Method&'">'&'<input name="'& $CTRL_ID & '" type="text" value="'& $Int_Val&'" size="'&$I_Size&'" maxlenght="'&$I_MaxChr&'">')

Return $CTRL_ID

EndFunc

Func _WebGuiCreateButton( $Ctrl_ID, $I_Text = 'Submit', $I_Type = 'Submit' )

echo( '<input type="'&$I_type&'" value="'&$I_Text&'" name="'&$CTRL_ID&'">')

Return $CTRL_ID

EndFunc

Func _WebGuiCreateEdit( $Ctrl_ID, $Int_Val = '', $I_Width = '50', $I_Height = '2', $I_Method = 'POST' )

Echo('<form action="'&$_SCRIPT_NAME&'" method='& $I_Method&'>')

If $I_Height = '1' Then

Echo('<textarea name="'&$CTRL_ID&'" cols="'&$I_Width&'" rows="'&$I_Height&'" >'&$Int_Val&'</textarea>')

Elseif $I_Height > 1 then

Echo('<textarea name="'&$CTRL_ID&'" cols="'&$I_Width&'" rows="'&$I_Height&'" value="'&$Int_Val&'"></textarea>')

Endif

Return $CTRL_ID

EndFunc

Func _WebGuiStartGroup( $I_Title = 'Group' )

Echo('<BR><fieldset><legend>'&$I_TITLE&'</legend>' )

Return 1

EndFunc

Func _WebGuiEndGroup( )

Echo('</fieldset>')

Return 1

EndFunc

Func _WebGuiCreateCombo($CTRL_ID, $Strings ='', $I_height = '' )

$Data = StringSplit( $strings, "|" )

IF IsArray($Data) Then

Echo('<form action="'&$_SCRIPT_NAME&'" method=POST>')

Echo('<select name="'&$CTRL_ID&'" size="'&$I_height&'">' )

For $i =1 to $data[0] step 1

Echo('<option>'&$data[$i]&'</option>' )

Next

Echo('</Select>')

REturn 1

Else

return 0

Endif

EndFunc

Func WebGuiCreatePassword( $CTRL_ID, $INT_VAL = '', $I_Width = '100' )

echo( '<input type="password" value="'&$Int_val&'" name="'&$CTRL_ID&'" size="'&$I_Width&'">')

EndFunc

Func _WebGuiCreatePassword( $CTRL_ID, $INT_VAL = '', $I_Width = '100' )

echo( '<input type="password" value="'&$Int_val&'" name="'&$CTRL_ID&'" size="'&$I_Width&'">')

Endfunc

Edited by DBak

[center][/center]

Share this post


Link to post
Share on other sites



OMG. You just gave us access to all the files on your hard drive. I suggest you delete that file, ASAP. If I really wanted to, I could download Dreamweaver from your server.

Anyway, in your UDF, some functions create a form and some don't. You should remove the lines creating the <form> and make a _WebGUICreateForm() function.

But this is a great idea.. I don't mean to poop on it.


[center]"Yes, [our app] runs on Windows as well as Linux, but if you had a Picasso painting, would you put it in the bathroom?" -BitchX.com (IRC client)"I would change the world, but they won't give me the source code." -Unknownsite . blog . portfolio . claimidcode.is.poetry();[/center]

Share this post


Link to post
Share on other sites

Coooooolll thanks for the compiler! Those examples are awesome <_<

And yeah, sandman is kinda right :)

Share this post


Link to post
Share on other sites

wow getting tons of hits computer beeps on every hit. thought about adding a key to aloow file download..l snd good?


[center][/center]

Share this post


Link to post
Share on other sites

Did you make the compiler? It's the only one that works for me! <_< works great.

In case you made it, it'd be cool if it didn't erase all the code when you compile.

Share this post


Link to post
Share on other sites

wow getting tons of hits computer beeps on every hit. thought about adding a key to aloow file download..l snd good?

yes, definitely! And I hope that you don't have any passwords stored on your computer, because if so, well you better change them.

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Share this post


Link to post
Share on other sites

yea i made the compiler. ill wrk on making it show youre source. ty 4 the comments and im going to lockdown the server file browser.enjoy the compiler ill post souce 4 it tommorrow!


[center][/center]

Share this post


Link to post
Share on other sites

shut the app down becuz someone had thier nose in my documents folder... shame... but ill be securing it soon!!!!


[center][/center]

Share this post


Link to post
Share on other sites

shut the app down becuz someone had thier nose in my documents folder... shame... but ill be securing it soon!!!!

<_<

Share this post


Link to post
Share on other sites

shut the app down becuz someone had thier nose in my documents folder... shame... but ill be securing it soon!!!!

I was in too, but it was an accident! I just clicked the link and it took me to the My Document, and then I tried to download something to see if it would work... This is pretty cool... I never thought of web based AutoIt like this..

My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]

Share this post


Link to post
Share on other sites

lol well anyways ill be adding a code to lockout the ppl i dnt want in it. btw the script builds a log of all files opened and downloaded...its not in the posted source...but it doesntbget ip's =( the onoine compiler messes up @ 26 lines 4 me or more but ill wrk on it tommorrow at 4 eastern time... i wish more people were interested in web based autoit..can u imagane autoit, php, perl, javascript all able to work together!?! that would be awesome!


[center][/center]

Share this post


Link to post
Share on other sites

lol well anyways ill be adding a code to lockout the ppl i dnt want in it. btw the script builds a log of all files opened and downloaded...its not in the posted source...but it doesntbget ip's =( the onoine compiler messes up @ 26 lines 4 me or more but ill wrk on it tommorrow at 4 eastern time... i wish more people were interested in web based autoit..can u imagane autoit, php, perl, javascript all able to work together!?! that would be awesome!

The log thing is the reason I'd never use a web based compiler unless it were on my own server.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

not sure why do u have to use ISS

abyss web server works great!


[center][/center]

Share this post


Link to post
Share on other sites

The log thing is the reason I'd never use a web based compiler unless it were on my own server.

What log? Your script is saved on my computer with a random number but i dont go through them, Im going to make it delete it after it compiles it... I dont care what people put in it, why would i log it lol... Ill Make try to find a way to make that page show its own source.. so that people know it doesnt log what you do... I really only made it for me.. but i left a link to it on a page, not that i care if people use it, just didnt even think to share it lol


[center][/center]

Share this post


Link to post
Share on other sites

ISS isnt installed unsless you tell it to be...

besides i like abyss better


[center][/center]

Share this post


Link to post
Share on other sites

What log? Your script is saved on my computer with a random number but i dont go through them, Im going to make it delete it after it compiles it... I dont care what people put in it, why would i log it lol... Ill Make try to find a way to make that page show its own source.. so that people know it doesnt log what you do... I really only made it for me.. but i left a link to it on a page, not that i care if people use it, just didnt even think to share it lol

Can't you do a file delete after the process is completed?

Share this post


Link to post
Share on other sites

IIS is not installed by default, you must goto add/remove programs and click 'add or remove windows components' to add it. (im sure there are other ways too.)

Share this post


Link to post
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
Sign in to follow this  
Followers 0