Jump to content

Want to Output PHP Script Using Autoit Gui Guidance please?


Altainta
 Share

Recommended Posts

Hello

What i want to do and achieve is based on this example (please remember the actual usage is a little more complex)

(IN SHORT AUTOIT TO PRODUCE CUSTOM CODED *.php FILES)

<?php
$PLUGIN['testme'] = "testme";
if (stristr($data_to_test, 'testme')) {

    $data = @file_get_contents($data_to_test);
    if ($data) {
        $one = str_between($data, 'datasheet', '&');
        $two = str_between($data, '&c=', '"');

        if ($one || $two) {
            $xml = 'http://localhost/test.ashx?fileid=' . $one . '&c=' . $two;
            $xmldata = @file_get_contents($xml);

            if ($xmldata) {
                $file_name = str_between($xmldata, '<filename><![CDATA[', ']]></filename>');

                if ($file_name) {
                    print $file_name;

                }
            }
        }
    }
}
?>

Now as you can see this is just a SAMPLE and a little code. But it defines enough about what we need.

So i want a gui where can i select and make this type of php file (CUSTOM with different if else condition and etc Mostly for IF else conditions)

can u help me achieve it with autoit ?

Or can u guide me how to exactly search for it in the forum ?

i tried PHP and Output PHP but it didn't work

can i achieve this by escaping special characters in autoit?

Why we need to do this?

Well to write the code again and again is too much pain and have to teach new guys too. If they don't know than we need others to create it gets complicated.. It is used for technical purpose.

Edited by Altainta
Link to comment
Share on other sites

I think it is possible, but you need as far as I know a lot of code... But just look at FileWriteLine().

I also use PHP sometimes, but I don't use if else conditions a lot.. It is possible, but not as easy it looks. :)

PowerSlide2UnlockiPhone look-a-like program you can use to lock your pc, you can't access your desktop again until the password is entered and the slider slided to the right. (really proud of it)-- After a time AutoIt and Windows, I switched to Mac. Don't expect me to answer anymore.
Link to comment
Share on other sites

How about writing php functions or using a framework, that's how normal php-guys do...

Do you know about codeigniter, zend etc?

But if they don't know anything about php, it's idd nice to make tutorials or something like you want.

Sorry, didn't get the question

Edited by Gideon

Many times you need to think like hobby-bob:')

Link to comment
Share on other sites

Okay i will now work with it... If i get any problem i will report back here...

Updates:

I guess the autoit doesn't accept the new line in variable here is a sample

$var = "<?php
$PLUGIN['testme'] = ""testme"";
if (stristr($data_to_test, 'testme')) {";

Any work around ?

I only get the Fileread option to bypass the double and single quote.. I read the Autoit Faq and because of that i added "" in the testme"" (above code)

Any guidance because what i want to achieve is little complex and i want some tips and tricks before proceeding further...

Edited by Altainta
Link to comment
Share on other sites

$var = "<?php
$PLUGIN['testme'] = ""testme"";
if (stristr($data_to_test, 'testme')) {";

Any work around ?

It's even more cumbersome then php, it will be:

$var = '"' & "<?php" & @crlf &
"$PLUGIN['testme'] = " & '"testme"' & @crlf & "if (stristr($data_to_test, 'testme')) {" & '";'
;And at the end you don't need ; This is comment

So I advise to use files with php-code and use fileread()

Edited by Gideon

Many times you need to think like hobby-bob:')

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