[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x

Scripting Languages

27K

Solutions

20K

Contributors

A scripting language is a programming language that supports scripts, programs written for a special run-time environment that automate the execution of tasks that could alternatively be executed one-by-one by a human operator. Scripting languages are often interpreted (rather than compiled). Primitives are usually the elementary tasks or API calls, and the language allows them to be combined into more complex programs. Environments that can be automated through scripting include software applications, web pages within a web browser, the shells of operating systems (OS), embedded systems, as well as numerous games. A scripting language can be viewed as a domain-specific language for a particular environment; in the case of scripting an application, this is also known as an extension language.

Share tech news, updates, or what's on your mind.

Sign up to Post

How to add custom Run command to Notepad++ for AutoHotkey and other programming/scripting languages
In a recent question here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video Micro Tutorial shows how to do it by adding a custom Run command to NPP. The method may easily be extended to any programming/scripting language that is callable via the command line with a parameter for the source code file name. A second example of this technique is included in the video for running a batch file (.BAT) in NPP.

1. Click the Run menu, then click the first item — Run...


After running NPP and performing the actions above, you will have this dialog:

Step1

2. Browse to the AutoHotkey executable


Click the ... button and navigate to AutoHotkey.exe, which is in C:\Program Files\AutoHotkey\ in a standard installation (but may, of course, be in a different folder on your system).

Step2

3. Add a parameter for the full path of the file in the current tab


You will now have this dialog box:

Step3a
Go to the end of the AutoHotkey.exe file name in the box and add this (including the quote marks):

"$(FULL_CURRENT_PATH)"

Be sure to make it all upper case.

Step3b

4. Save the new Run command


Click the Save... button, which gives you this dialog:

Step4
Give the new, custom Run command a name (I chose AHK in the video) and assign it to a hotkey (if you wish) by ticking CTRL and/or ALT and/or SHIFT, then one of the keys in the drop-down. When you have an OK button that is not grayed out, click it, then click Cancel to close the dialog.

5. Repeat Steps 1-4 for other programming/scripting languages


The video shows how to do it for batch (BAT) files, namely:

cmd /c "$(FULL_CURRENT_PATH)"

You may, of course, do it for other programming/scripting languages.

Step5
2
LVL 19

Expert Comment

by:Kyle Santos
Nice.  I use AutoHotKeys and NotePad++ and they're great programs for what I do at my job.  Good video, Joe!
0
LVL 62

Author Comment

by:Joe Winograd, Fellow&MVE
Hi Kyle,
Thanks for the compliment and the endorsement — both very much appreciated! Regards, Joe
0
Exploring SQL Server 2016: Fundamentals
LVL 12
Exploring SQL Server 2016: Fundamentals

Learn the fundamentals of Microsoft SQL Server, a relational database management system that stores and retrieves data when requested by other software applications.

Lists and Links
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
0
Xpdf - PDFfonts - Command Line Utility to List Fonts Used in a PDF File
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. In addition to the name of the font, it shows the font type and whether or not the font is embedded in the PDF file (and, if embedded, whether or not it is a subset), along with other font information that is discussed in the documentation file. It does this via a command line interface, making it suitable for use in batch files, programs, and scripts — any place where a command line call can be made.

1. Download the software


You may have already downloaded and unzipped the Xpdf tools while watching the first video in the Xpdf series, but if you haven't, then visit the Xpdf website. Click the Download link and then click the pre-compiled Windows binary ZIP archive to download the utilities for Windows.

Step1

2. Locate the documentation folder for the Xpdf utilities


Go to the folder where you unzipped the downloaded ZIP file and find the doc folder.

Step2

3. Read the documentation for the PDFfonts tool


Go into the doc folder and find the plain text file called pdffonts.txt.

Open it with any text editor, such as Notepad, and read it. This is the documentation for the PDFfonts tool.

Step3

4. Set up a test folder


Create a test folder.

Copy pdffonts.exe from the unzipped bin32 folder into your test folder.

Copy a couple of sample PDF files into your test folder, preferably ones with many different fonts.

Step4

5. Set up a command prompt for testing

2
LVL 19

Administrative Comment

by:Kyle Santos
Congratulations!  Your video has been Accepted and is now published on Experts Exchange.  Thank you for your contributions.
1
LVL 62

Author Comment

by:Joe Winograd, Fellow&MVE
Hi Kyle,
Thanks for publishing and upvoting — both appreciated! Regards, Joe
1
Xpdf - PDFtoPNG - Command Line Utility to Convert a Multi-page PDF File into Separate PNG Files
In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a command line interface, making it suitable for use in batch files, programs, and scripts — any place where a command line call can be made.

1. Download the software


You may have already downloaded and unzipped the Xpdf tools while watching the first video in the Xpdf series, but if you haven't, then visit the Xpdf website. Click the Download link and then click the pre-compiled Windows binary ZIP archive to download the utilities for Windows.

Step1

2. Locate the documentation folder for the Xpdf utilities


Go to the folder where you unzipped the downloaded ZIP file and find the doc folder.

Step2

3. Read the documentation for the PDFtoPNG tool


Go into the doc folder and find the plain text file called pdftopng.txt.

Open it with any text editor, such as Notepad, and read it. This is the documentation for the PDFtoPNG tool.

Step3

4. Set up a test folder


Create a test folder.

Copy pdftopng.exe from the unzipped bin32 folder into your test folder.

Copy a sample PDF file into your test folder. Of course, it will work fine with a one-page PDF file, but it is more instructive to test it with a multi-page PDF.

Step4

5. Set up a command prompt for testing


Open a command prompt window.

Navigate to your test folder.

Issue a DIR command in the command prompt to be sure that only two files are in it - the PDFtoPNG executable and the sample PDF file.

Step5

6. Run the PDFtoPNG utility

1
LVL 62

Author Comment

by:Joe Winograd, Fellow&MVE
Kyle,
Thanks for the fast publishing and the compliment — both appreciated! Regards, Joe
1
LVL 62

Author Comment

by:Joe Winograd, Fellow&MVE
Hi Tia Henderson,
I'm sure that you meant to endorse this video (rather than Kyle's comment that it was Accepted and my comment thanking Kyle). To endorse the video, you must click the thumbs-up icon that is right underneath the video steps (before this Comments section begins). Thanks, Joe
0
Xpdf - PDFdetach - Command Line Utility to Detach Attachments from PDF Files
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable for use in batch files, programs, and scripts — any place where a command line call can be made.

1. Download the software.


You may have already downloaded and unzipped the Xpdf tools while watching the first video in the Xpdf series, but if you haven't, then visit the Xpdf website. Click the Download link and then click the pre-compiled Windows binary ZIP archive to download the utilities for Windows.

Step1

2. Locate the documentation folder for the Xpdf utilities.


Go to the folder where you unzipped the downloaded ZIP file and find the <doc> folder.

Step2

3. Read the documentation for the PDFdetach tool.


Go into the <doc> folder and find the plain text file called <pdfdetach.txt>.

Open it with any text editor, such as Notepad, and read it. This is the documentation for the PDFdetach tool.

Step3

4. Set up a test folder.


Create a test folder.

Copy <pdfdetach.exe> from the unzipped <bin32> folder into your test folder.

Copy a sample PDF file that has attachments into your test folder (in the video and the screenshots below, the file is called test.pdf, which is a PDF file created from my EE article, Windows 10 uses YOUR computer to help distribute itself, but with some attachments added to it).

Step4

5. Set up a command prompt for testing.

4
LVL 27

Expert Comment

by:NVIT
Hi Joe...

> A way to achieve that is to extract first with PDFdetach and then print the file to a PDF print driver.

That would work for me. Thanks!

Mahalo
1
LVL 62

Author Comment

by:Joe Winograd, Fellow&MVE
A`ole pilikia!
0
Xpdf - PDFinfo - Command Line Utility to Retrieve Page Count and Other Information from PDF Files
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF file's Info Dictionary, as well as some other information (metadata), including the page count. We show how to isolate the page count in a plain text file, and the same method may be used to isolate other metadata fields, such as the Author and PDF Producer. PDFinfo provides a command line interface, making it suitable for use in batch files, programs, and scripts — any place where a command line call can be made.

1. Download the software.


You may have already downloaded and unzipped the Xpdf tools while watching the first video in the Xpdf series, but if you haven't, then visit the Xpdf website. Click the Download link and then click the pre-compiled Windows binary ZIP archive to download the utilities for Windows.

Step1

2. Locate the documentation folder for the Xpdf utilities.


Go to the folder where you unzipped the downloaded ZIP file and find the <doc> folder.

Step2

3. Read the documentation for the PDFinfo tool.


Go into the <doc> folder and find the plain text file called <pdfinfo.txt>.

Open it with any text editor, such as Notepad, and read it. This is the documentation for the PDFinfo tool.

Step3

4. Set up a test folder.


Create a test folder.

Copy <pdfinfo.exe> from the unzipped <bin32> folder into your test folder.

Copy a sample PDF file into your test folder (in the video and the screenshots below, the file is called test.pdf, which is a PDF file created from my EE article, Windows 10 uses YOUR computer to help distribute itself).

Step4

5. Set up a command prompt for testing.

3
Introduction to PHP: Building the Form
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing.

1. Set up your basic HTML file. Open your form tag and set the method and action attributes.


<!DOCTYPE html>
<html>
	<head>
		<title>My first php script</title>
	</head>
	<body>
		<form method="post" action="process.php">

Open in new window

2. Set up your first few inputs one for the name and the gender.

A simple set of radio buttons will do here.
<label>Name: <input type="name" name="fullname" placeholder="Enter your name here."></label>
<label>Gender: <input type="radio" name="gender" value="M" checked>Male  <input type="radio" name="gender" value="F">Female</label>

Open in new window

3. Label the date of birth field, setup a few select boxes that will use PHP to loop through respectively to get the month, day and year.


<label>Birthday: <select name="month">
				<?php for($m=1; $m<=12; $m++){
							echo "<option value=".$m.">".$m."</option>";
				} ?>
				</select>/
				<select name="day">
				<?php for($d=1; $d<=31; $d++){
							echo "<option value=".$d.">".$d."</option>";
				} ?>
				</select>/
				<select name="year">
				<?php for($y=1880; $y<=2014; $y++){
							echo "<option value=".$y.">".$y."</option>";
				} ?></select>
			</label>

Open in new window

4. Set up a field for the email address.


<label>E-mail: <input type="email" name="emailaddy" placeholder="Enter your best email address."></label>

Open in new window

5. Label the randomized ID # as ID #. Set the variable for this ID number and put it into a hidden field.


<label>My ID #: <?php $nyid=rand(0,199999); echo $myid; ?>
			<input type="hidden" value="<?php echo $myid; ?>"></label>"][/step]
[step="6" title="Set your submit button and close out the form and page.

			<label><input type="submit" name="saveme" value="Send Profile"></label>
		</form>
	</body>
</html>

Open in new window

2
Introduction to jQuery (Part 1)
The viewer will learn the basics of jQuery, including how to invoke it on a web page.

1. Reference your jQuery libraries

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>

Open in new window

2. Include your new external js/jQuery file

<script src="js/mediasage.js"></script>

Open in new window

3. Write your first lines of code to setup your site for jQuery.

jQuery(document).ready(function($){
});

Open in new window

2
LVL 12

Expert Comment

by:Mortaza Doulaty
DOM stands for Document Object Model, not Direct Object Model.
1
How to Add a Watermark to an Image Using PHP (Part 2)
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
1
Look For Files Using PHP
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
0
Become a CompTIA Certified Healthcare IT Tech
LVL 12
Become a CompTIA Certified Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

Using PHP to Count Item Occurrences in Arrays
The viewer will learn how to count occurrences of each item in an array.
1
PHP, jQuery, and Form Actions
The viewer will learn how to dynamically set the form action using jQuery.
1

Expert Comment

by:Mamun Hoque
good tutorial (y)
0
Matching Tagged Data with PHP Regular Expressions
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will work in other browsers.

1. Important note about parsing tagged data

2. Show how to find an element on an HTML page using Firefox developer tools

3. Show how to capture the tagged data using the PHP function preg_match

4. Show how to separate the tags from the enclosed data

5. Show how to use the PHP preg_replace function to replace a value with a new value

1
Xpdf - PDFtoText - Convert PDF Files to Plain Text Files
In this third video of the Xpdf series, we discuss and demonstrate the PDFtoText utility, which converts PDF files into plain text files. It does this via a command line interface, making it suitable for use in batch files, programs, and scripts — any place where a command line call can be made.

1. Download and install the software.

You may have already downloaded and installed the Xpdf tools while watching the first  or second video in the Xpdf series , but if you haven't, then visit the Xpdf website at:

http://www.foolabs.com/xpdf/

Click the Download link and then click the pre-compiled Windows binary ZIP archive to download the Xpdf utilities for Windows.
precompiled binaries

2. Locate the documentation folder for the Xpdf utilities.

Go to the folder where you unzipped the downloaded ZIP file and find the <doc> folder.
documentation folder

3. Read the documentation for the PDFtoText tool.

Go into the <doc> folder and find the plain text file called <pdftotext.txt>.

Open it with any text editor, such as Notepad, and read it. This is the documentation for the PDFtoText tool.
read me

4. Set up a test folder.

Create a test folder.

Copy <pdftotext.exe> from the unzipped <bin32> folder into your test folder.

Copy a sample PDF file into your test folder (in the video and the screenshots below, the file is called <RMP.pdf>).
test folder

5. Set up a command prompt for testing.

Open a command prompt window.

Navigate to your test folder.

Issue a DIR command in the command prompt to be sure that only two files are in it - the PDFtoText executable and the sample PDF file.
cmd prompt dir

6. Run the PDFtoText utility on the sample PDF file.

In the command prompt window, enter the following command:

pdftotext -layout samplefilename.pdf
command line

7. Verify that the text file that was created.

10
LVL 23

Expert Comment

by:Andrew Leniart
Great tutorial series. This will be very handy for me!
0
LVL 62

Author Comment

by:Joe Winograd, Fellow&MVE
Hi Andrew,
I'm glad to hear that my Xpdf series will be useful for you. This particular one, PDFtoText, is the one that I use the most in my custom programs. Cheers, Joe
P.S. Thanks for the endorsement!
0
Xpdf - Command Line Utilities for PDF Files
In this first video of the Xpdf series, we introduce and describe Xpdf, a library containing nine command line utilities that perform various functions on PDF files. We show where the library is located and how to download it, discuss its licensing provisions, and provide a brief description of each of the nine modules. Since all the utilities offer a command line interface, they are suitable for use in batch files, programs, and scripts — any place where a command line call can be made. This first video sets the stage for subsequent Micro Tutorials in this Xpdf series.

1. Download and install the software.

Visit the Xpdf website at:

http://www.foolabs.com/xpdf/

Click the Download link and then click the pre-compiled Windows binary ZIP archive to download the Xpdf utilities for Windows.
precompiled binaries

2. Read the licensing agreements.

Go to the folder where you unzipped the downloaded ZIP file.

Read the licensing agreements, which are in plain text files called COPYING (which is GNU GPL V2) and COPYING3 (which is GNU GPL V3) in the root of the unzipped archive.
licensing

3. If you need commercial licensing, visit the parent company's website.

For commercial licensing, visit the Glyph & Cog website:

http://www.glyphandcog.com/
glyph & cog

4. Locate the folder with the documentation.

Go to the folder where you unzipped the downloaded ZIP file and find the subfolder called <doc>.
documentation folder

5. Read all of the documentation.

Go into the <doc> folder and read the documentation. All of the files are plain text files that may be opened with any text editor, such as Notepad, or any software that can open a text file, such as Word or WordPad.
documentation

6. Locate the executables for the utilities.

7
LVL 23

Expert Comment

by:Andrew Leniart
Great video Joe! Excellent tool I had no idea existed.
0
LVL 62

Author Comment

by:Joe Winograd, Fellow&MVE
Thanks, Andrew, I appreciate the compliment...and the endorsement! Regards, Joe
0
Python Programming: While and For Loops
Learn the basics of while and for loops in Python.

1. while loops are used for testing while, or until, a condition is met

2. The structure of a while loop is as follows: while <condition>: do something repeate

3. The break statement may be used to exit a while loop when a condition is met

4. for loops iterate through a sequence or range a specified amount

5. The structure of a for loop is as follows: for <every element> in a <a sequence or range>: do something

6. The continue statement may be used to exit an iteration of a for loop, but not the loop itself.

1
Python Programming: If Statements
Learn the basics of if, else, and elif statements in Python 2.7.

1. Use "if" statements to test a specified condition.


The structure of an if statement is as follows:
if <condition>:         
           do something

Open in new window

2. Use "else" statements to allow the execution of an alternative, if the first condition is not met


The structure of an if, else statement is as follows:
if <condition>:
         do something     
else:
         do something different

Open in new window

3. Use "elif" statements allow for the checking of multiple conditions.


The structure of an if, else, elif statement is as follows:    
if <condition>:
         do something     
elif <another condition>:
         do something different     
else:
         do something completely different

Open in new window

6
Python Programming: Lists
Learn the basics of lists in Python.

1. Lists, as their name suggests, are a means for ordering and storing values.

2. Lists are declared using brackets; for example: t = [1, 2, 3]

3. Lists may contain a mix of data types; for example: t = ['string', 1, True]

4. Lists may be nested, for example: t = [ 'string', [1, True]]

5. List elements are accessed by index; for example: t[0]

6. The slice method is used to access a specific range of elements within a list; for example: t[1:3]

0

Expert Comment

by:Abdou DOUCOURE
Very simple and quick. Good micro tuto
0
Python Programming: Strings
Learn the basics of strings in Python: declaration, operations, indices, and slicing.

1. Strings are declared with quotations; for example: s = "string"

2. Strings are immutable.

3. Strings may be concatenated or multiplied using the addition and multiplication operators, respectively.

4. String characters may be accessed by index; for example: s[1]

5. A specific range of a string may be accessed using the slice method; for example: s[1:3]

1

Scripting Languages

27K

Solutions

20K

Contributors

A scripting language is a programming language that supports scripts, programs written for a special run-time environment that automate the execution of tasks that could alternatively be executed one-by-one by a human operator. Scripting languages are often interpreted (rather than compiled). Primitives are usually the elementary tasks or API calls, and the language allows them to be combined into more complex programs. Environments that can be automated through scripting include software applications, web pages within a web browser, the shells of operating systems (OS), embedded systems, as well as numerous games. A scripting language can be viewed as a domain-specific language for a particular environment; in the case of scripting an application, this is also known as an extension language.