Scripting Languages

26K

Solutions

72

Articles & Videos

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 16

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 54

Author Comment

by:Joe Winograd, EE MVE 2015&2016
Hi Kyle,
Thanks for the compliment and the endorsement — both very much appreciated! Regards, Joe
0
Learn by Doing. Anytime. Anywhere.
Learn by Doing. Anytime. Anywhere.

Do you like to learn by doing?
Our labs and exercises give you the chance to do just that: Learn by performing actions on real environments.

Hands-on, scenario-based labs give you experience on real environments provided by us so you don't have to worry about breaking anything.

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. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any place where a command line call can be made. 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.

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 16

Administrative Comment

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

Author Comment

by:Joe Winograd, EE MVE 2015&2016
Hi Kyle,
Thanks for publishing and upvoting — both appreciated! Regards, 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 programs, scripts, batch files — 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.

3
 
LVL 24

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
0
 
LVL 54

Author Comment

by:Joe Winograd, EE MVE 2015&2016
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's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a plain text file, suitable for usage in a program or script.

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.


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 PDFinfo executable and the sample PDF file.

Step5

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

1
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

1
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

1
 
LVL 12

Expert Comment

by:Mortaza Doulaty
DOM stands for Document Object Model, not Direct Object Model.
0
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
Using PHP to Count Item Occurrences in Arrays
The viewer will learn how to count occurrences of each item in an array.
1
Is Your Team Achieving Their Full Potential?
Is Your Team Achieving Their Full Potential?

74% of employees feel they are not achieving their full potential. With Linux Academy, not only will you strengthen your team's core competencies but also their knowledge of of the newest IT topics.

With new material every week, we'll make sure that you stay ahead of the game.

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 - Convert PDF Files to Plain Text Files - Part 3
In this third video of the Xpdf series, we discuss and demonstrate the PDFtoText utility, which converts PDF files into plain text files.

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.

Issue a DIR command in the command prompt to show that the text file was created. There should be one text file with the same file name as the PDF file, but with a file type of TXT.
cmd prompt dir 2

8. View the text file that was created.

9
 
LVL 1

Expert Comment

by:James Powell
Awesome tool!  Thank you for posting this.  Very useful.
0
 
LVL 54

Author Comment

by:Joe Winograd, EE MVE 2015&2016
You're welcome, James. I'm glad you find it useful. And thanks to you for the comment — authors really appreciate hearing words like that! 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

26K

Solutions

72

Articles & Videos

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.