Jump to content

Web Based AutoIT - HTML Form UDF


DirtDBaK
 Share

Recommended Posts

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]

Link to comment
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]

Link to comment
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

Link to comment
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]
Link to comment
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]

Link to comment
Share on other sites

  • Moderators

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.

Link to comment
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]

Link to comment
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?
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...