Jump to content

Help. old batch dog learn new autoIT tricks


ravaged1
 Share

Recommended Posts

I have been using batch files since DOS and I need a kick start here.

Want to learn AutoIT and have looked over many tutorials, but I'm lost a bit now.

How can I add a line of text with special characters to a file?

Example of Batch line:

echo user_pref("network.proxy.autoconfig_url", "http://10.1.64.13/proxy/wtproxy.pac"); >> user.js

Thanks for any help.

Link to comment
Share on other sites

FileWriteLine($file, @CRLF)

;)

*edit*

more specific

Edited by kaotkbliss

010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Link to comment
Share on other sites

:

FileWrite($file, 'user_pref("network.proxy.autoconfig_url", "http://10.1.64.13/proxy/wtproxy.pac");')

:

I didn't understand using different quotes.

Such a nub. ;)

If you need single quotes (') within a string, you have to enclosure the string with double quotes (")

If you need double quotes (") within a string, you have to enclosure the string with single quotes (')

MsgBox(0, "Text", "This is a text containing 'single quotes'  ")
MsgBox(0, "Text", 'This is a text containing "double quotes"  ')
                  ^                          ^             ^  ^

So in

FileWrite($file, 'user_pref("network.proxy.autoconfig_url", "http://10.1.64.13/proxy/wtproxy.pac");')

the line to be printed user_pref("network.proxy.autoconfig_url", "http://10.1.64.13/proxy/wtproxy.pac"); contains double quotes (") ergo the hole string is enclosured with single quotes.

A-Jay

Rule #1: Always do a backup         Rule #2: Always do a backup (backup of rule #1)

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