Search Results

Search found 2544 results on 102 pages for 'scripting'.

Page 4/102 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Applescript file dialog with UI scripting

    - by Pepijn
    I am trying to open a file in a not so scriptable area of an application. I got halfway there by using UI scripting to select the proper menu item, but this opens a standard file dialog. How can I set the destination of the file dialog with Applescript?

    Read the article

  • FTP files in Windows Scripting Host?

    - by adib
    Hi What is the recommended way to transfer files via FTP and manage (rename, move, delete) files in an FTP server programmatically in a Windows Scripting Host script file (JavaScript/VBScript)? Preferably without requiring 3rd party ActiveX add-ons since these "extra" software will need to go through an approval process that will take a very long time, even for free (as in beer) and/or open source components. The script is going to be run in a Windows 2003 Server in data center environment. Thanks.

    Read the article

  • Pros/cons of embedded scripting environments?

    - by pomeroy
    There are several scripting environments available for .NET applications (e.g.this post). My question is, what are the pros/cons of using each of them? PowerShell IronPython Lua JavaScript I'm really looking for answers from folks that have tried to do this. Thanks.

    Read the article

  • Catching typos in scripting languages

    - by Geo
    If your scripting language of choice doesn't have something like Perl's strict mode, how are you catching typos? Are you unit testing everything? Every constructor, every method? Is this the only way to go about it?

    Read the article

  • A scripting langauge for Windows?

    - by WhyKiki
    I work in Windows and often find the need to code some script that manipulates files or basic string manipulation. Currently, I'm doing this using PHP but having a LAMP stack for this seems overkill. I've tried things like autoHotkey but the syntax and functionality is horrific. So I'm looking for a scripting with: a) a sane syntax b) lots and lots of built-in libraries, functions, etc c) minimal setup. Preferably, I would like to code and run the script from my app launcher of choice, Executor

    Read the article

  • Google I/O 2010 - Scripting Google Apps for business

    Google I/O 2010 - Scripting Google Apps for business Google I/O 2010 - Scripting Google Apps for business process automation Enterprise 201 Evin Levey Learn how to use Google Apps for business process automation, and custom work-flow. We'll introduce the powerful scripting service along with several easy-to-use interfaces including Spreadsheets, Calendar, Sites and the Document List. We'll also demonstrate interoperability with third party web services and showcase exciting new developments in Google Apps Script. For all I/O 2010 sessions, please go to code.google.com From: GoogleDevelopers Views: 8 0 ratings Time: 53:16 More in Science & Technology

    Read the article

  • Upload image with Photoshop scripting

    - by cosmorocket
    Is that possible to upload an image from Photoshop (for example, an open image exported to jpeg) to some web place - REST service, FTP etc by using scripting features of Photoshop? For example - I have an image open in Photoshop and then execute some special script that sends an exported version of it to some place over the web. I saw something like this but it uses an automatically generated batch file that executes ftp command on Windows. I would like to use something more beautiful if it's possible. Or may be there are some info to know how to make a simple plugin for just this task. Thanks.

    Read the article

  • Scripting Bridge generates error creating a new playlist in iTunes on 10.5, but not 10.6

    - by Simone Manganelli
    I'm having a problem with the Scripting Bridge framework in 10.5. Specifically, I use this code to create a new user playlist in iTunes: NSDictionary *propertiesDict = [NSDictionary dictionaryWithObject:@"playlistName" forKey:@"name"]; playlistToReturn = (iTunesUserPlaylist*)[[[iTunesApp classForScriptingClass:@"user playlist"] alloc] initWithProperties:propertiesDict]; SBElementArray *sourcesArray = [iTunesApp sources]; iTunesSource *librarySource = [sourcesArray objectAtIndex:0]; SBElementArray *userPlaylistsArray = [librarySource userPlaylists]; [userPlaylistsArray addObject:playlistToReturn]; This code works fine in 10.6. The playlist is created correctly, and I can add songs to it later. However, on 10.5, an error is generated: Apple event:'core'\'crel'{ 'kocl':'cUsP', 'insh':'insl'{ 'kobj':'obj '{ 'want':'cUsP', 'from':'obj '{ 'want':'cSrc', 'from':'null'(), 'form':'ID ', 'seld':42 }, 'form':'indx', 'seld':'abso'($206C6C61$) }, 'kpos':'end ' }, 'prdt':{ 'pnam':'utxt'("playlistName") } }; Error Domain=SBError Code=-10014 UserInfo=0x152c8cb0 "Operation could not be completed. (SBError error -10014.)" Why?

    Read the article

  • Creating iPhoto albums using Cocoa Scripting Bridge

    - by robinjam
    I'm tearing my hair out trying to create a new album from a Cocoa Application. In applescript it's a nice simple procedure: tell application "iPhoto" new album name "Album" end tell But I can't work out how this is done in Cocoa via the Scripting Bridge. I've tried this: iPhotoApplication *iPhoto = [SBApplication applicationWithBundleIdentifier:@"com.apple.iPhoto"]; iPhotoAlbum *newAlbum = [[[[iPhoto classForScriptingClass:@"album"] alloc] initWithProperties:[NSDictionary dictionaryWithObject:@"Album" forKey:@"name"]] autorelease]; [[iPhoto albums] addObject:newAlbum]; But that had no effect. Please help!

    Read the article

  • What Is The Best Scripting Language To Learn?

    - by Strider
    I have been learning C and C++ for sometime now. But, they do not allow me to do a lot of things like writing a script/program to get a bunch of files from the internet easily. So, I want to learn a scripting language which is fun and which is useful for everyday chores. Which one would you recommend, and why? Other information that might be useful: References to tutorials / helpful information on how to learn the language. References to implementations of the language. Niches where you have found it to be particularly useful.

    Read the article

  • New tab in Safari window from Cocoa and Scripting Bridge

    - by Thor Frølich
    I'm trying to create a new tab in a Safari window from Cocoa using Scripting Bridge. My code looks something like this: SafariApplication *safari = [SBApplication applicationWithBundleIdentifier:@"com.apple.Safari"]; if ([[safari windows] count] == 0) { NSLog(@"No window found. Creating a new one."); SafariDocument *newDoc = [[[safari classForScriptingClass:@"document"] alloc] init]; [[safari windows] addObject:newDoc]; [newDoc release]; } else { NSLog(@"Seems we already have a safari window"); SafariTab *newTab = [[[safari classForScriptingClass:@"tab"] alloc] init]; [[[safari windows] objectAtIndex:0] addObject:newTab]; [newTab release]; } The first part if the "if" works, creating a new window. Creating the tab does not. This gets me "-[SafariWindow addObject:]: unrecognized selector sent to instance...", so obviously that's not the way to do it. I can't figure out how windows, documents and tabs relate to each other in Safari. Any help is greatly appreciated. Thanks, Thor

    Read the article

  • JavaScript - Cross Site Scripting - Permission Denied

    - by Villager
    Hello, I have a web application for which I am trying to use Twitter's OAuth functionality. This application has a link that prompts a user for their Twitter credentials. When a user clicks this link, a new window is opened via JavaScript. This window serves as a dialog. This is accomplished like such: MainPage: <div id="promptDiv"><a href="#" onclick="launchDialog('twitter/prompt.aspx');">Provide Credentials</a></div> ... function launchDialog(url) { var specs = "location=0,menubar=0,status=0,titlebar=0,toolbar=0"; var dialogWindow = window.open(url, "dialog", specs, true); } When a user clicks the link, they are redirected to Twitter's site from the prompt.aspx page. On the Twitter site, the user has the option to enter their Twitter credentials. When they have provided their credentials, they are redirected back to my site. This is accomplished through a callback url which can be set for applications on Twitter's site. When the callback happens, the user is redirected to "/twitter/confirm.aspx" on my site in the dialog window. When this happens I want to update the contents of "promptDiv" to say "You have successfully connected with Twitter" to replace the link and close the dialog. This serves the purpose of notifying the user they have successfully completed this step. I can successfully close the dialog window. However, when I am try to update the HTML DOM, I receive an error that says "Error: Permission denied to get property Window.document". In an attempt to update the HTML DOM, I tried using the following script in "/twitter/confirm.aspx": // Error is thrown on the first line. var confirmDiv = window.opener.document.getElementById("confirmDiv"); if (confirmDiv != null) { // Update the contents } window.close(); I then just tried to read the HTML to see if I could even access the DOM via the following script: alert(window.opener.document.body.innerHTML); When I attempted this, I still got a "Permission denied" error. I know this has something to do with cross-site scripting. However, I do not know how to resolve it. How do I fix this problem? Am I structuring my application incorrectly? How do I update the HTML DOM after a user has been redirected back to my site? Thank you for your help!

    Read the article

  • How can a Linux Administrator improve their shell scripting and automation skills?

    - by ewwhite
    In my organization, I work with a group of NOC staff, budding junior engineers and a handful of senior engineers; all with a focus on Linux. One interesting step in the way the company grows talent is that there's a path from the NOC to the senior engineering ranks. Viewing the talent pool as a relative newcomer, I see that there's a split in the skill sets that tends to grow over time... There are engineers who know one or several particular technologies well and are constantly immersed... e.g. MySQL, firewalls, SAN storage, load balancers... There are others who are generalists and can navigate multiple technologies. All learn enough Linux (commands, processes) to do what they need and use on a daily basis. A differentiating factor between some of the staff is how well they embrace scripting, automation and configuration management methodologies. For instance, we have two engineers who do the bulk of Amazon AWS CloudFormation work, and another who handles most of the Puppet infrastructure. Perhaps a quarter of the engineers are adept at BASH shell scripting. Looking at this in the context of the incredibly high demand for DevOps skills in the job market, I'm curious how other organizations foster the development of these skills and grow their internal talent. Scripting doesn't seem like a particularly-teachable concept. How does a sysadmin improve their shell scripting? Is there still a place for engineers who do not/cannot keep up in the DevOps paradigm? Are we simply to assume that some people will be left behind as these technologies evolve? Is that okay?

    Read the article

  • What Scripting Program would you choose to recover deleted and missing files?

    - by Steven Graf
    For a private project I'm looking for a command line tool to scan and recover files. I'm working on Gnome 3 (but I could also change my OS if it helps reaching my goal) and must be able to find and recover files on attached devices with formats such as NTFS, Fat32, MAC OS Extended and ext3. Is there a command line script to cover all of them or do I need to use different programs to reach my goal? can you recommend command line tools for these kind of tasks? is one of you willing and able to show me some examples and teach me further?

    Read the article

  • Beginning with shell scripting

    - by Kevin Wyman
    I am fresh into Ubuntu and one of my goals is shell scripting for personal (and maybe public) use. I'm a novice, though I do understand some of the basics (e.g. what a variable, string, loop, etc... is) but to get the most of scripting I need to learn in-depth. I figure the best way to do that is to jump right into scripting and ask questions only pertinent to the stage I am at in my attempted script. Scenario: I have edited my sudoers file to allow my non-root user to run sudo commands without being prompted for a password. Question: In vim, what would be the best code to use for a function that checks whether this condition is [true], If not, prompt the user if they want the script to edit and save the sudoers file to make this condition [true]? Layout - If condition is true, carry-on with rest of script. If condition is not true, the script silently edits/adds the line: %sudo ALL=(ALL:ALL) NOPASSWD: ALL in the sudoers file, saves and then continues on with the next part of the script. Any help with this would be greatly appreciated and assist me in my journey to writing shell scripts.

    Read the article

  • UNIX Shell-scripting: UDV

    - by Myx
    I am writing a simple unix shell script: #!/bin/bash # abort the script if a command fails set -e # abort the script if an unitialized shell variable is used set -u i = 0; while [$i -l 1] do src/meshpro input/martini.off video/noise/image$i.off -noise $i src/meshview video/noise/image$i.off -output_image video/noise/image$i.jpg -exit_immediately i='expr $i + 0.1' done When I try to run the script, I get the following error: line 14: i: command not found. I used a tutorial to apply to my code. Any suggestions on what I'm doing wrong?

    Read the article

  • idioms for returning multiple values in shell scripting

    - by Wang
    Are there any idioms for returning multiple values from a bash function within a script? http://tldp.org/LDP/abs/html/assortedtips.html describes how to echo multiple values and process the results (e.g., example 35-17), but that gets tricky if some of the returned values are strings with spaces in. A more structured way to return would be to assign to global variables, like foo () { FOO_RV1="bob" FOO_RV2="bill" } foo echo "foo returned ${FOO_RV1} and ${FOO_RV2}" I realize that if I need re-entrancy in a shell script I'm probably doing it wrong, but I still feel very uncomfortable throwing global variables around just to hold return values. Is there a better way? I would prefer portability, but it's probably not a real limitation if I have to specify #!/bin/bash.

    Read the article

  • AWK scripting :How to remove Field separator using awk

    - by anil-1985
    Need the following output ONGC044 ONGC043 ONGC042 ONGC041 ONGC046 ONGC047 from this input Medium Label Medium ID Free Blocks =============================================================================== [ONGC044] ECCPRDDB_FS_43 ac100076:4aed9b39:44f0:0001 195311616 [ONGC043] ECCPRDDB_FS_42 ac100076:4aed9b1d:44e8:0001 195311616 [ONGC042] ECCPRDDB_FS_41 ac100076:4aed9af4:4469:0001 195311616 [ONGC041] ECCPRDDB_FS_40 ac100076:4aed9ad3:445e:0001 195311616 [ONGC046] ECCPRDDB_FS_44 ac100076:4aedd04a:68c6:0001 195311616 [ONGC047] ECCPRDDB_FS_45 ac100076:4aedd4a0:6bf5:0001 195311616

    Read the article

  • shell scripting: search/replace & check file exist

    - by johndashen
    I have a perl script (or any executable) E which will take a file foo.xml and write a file foo.txt. I use a Beowulf cluster to run E for a large number of XML files, but I'd like to write a simple job server script in shell (bash) which doesn't overwrite existing txt files. I'm currently doing something like #!/bin/sh PATTERN="[A-Z]*0[1-2][a-j]"; # this matches foo in all cases todo=`ls *.xml | grep $PATTERN -o`; isdone=`ls *.txt | grep $PATTERN -o`; whatsleft=todo - isdone; # what's the unix magic? #tack on the .xml prefix with sed or something #and then call the job server; jobserve E "$whatsleft"; and then I don't know how to get the difference between $todo and $isdone. I'd prefer using sort/uniq to something like a for loop with grep inside, but I'm not sure how to do it (pipes? temporary files?) As a bonus question, is there a way to do lookahead search in bash grep? To clarify: so the simplest way to do what i'm asking is (in pseudocode) for i in `/bin/ls *.xml` do replace xml suffix with txt if [that file exists] add to whatsleft list end done

    Read the article

  • Blackberry development on scripting language ?

    - by zvr
    From what I've seen, the preferred way to develop Blackberry applications is Java. Is this the only way? I'm dreaming of a rapid application environment where you can create GUIs (using the Blackberry UI components). Something like a port of Tcl/Tk on Blackberry... or Python/Tkinter... or something new, but similar. Does something like that exist ? (I doubt it) Can something like that exist ? (i.e., given the money, is it feasible/reasonable/...)

    Read the article

  • FTP to SFTP in shell scripting

    - by Kimi
    This script is to connect to different servers and copy a file from a loaction defined. It is mandatory to use sftp and not ftp. #!/usr/bin/ksh -xvf Detail="jyotibo|snv4915|/tlmusr1/tlm/rt/jyotibo/JyotiBo/ jyotibo|snv4915|/tlmusr1/tlm/rt/jyotibo/JyotiBo/" password=Unix11! c_filename=import.log localpath1=`pwd` for i in $Detail do echo $i UserName=`echo $i | cut -d'|' -f1` echo $UserName remotehost=`echo $i | cut -d'|' -f2` echo $remotehost remote_path=`echo $i | cut -d'|' -f3` echo $remote_path { echo "open $remotehost user $UserName $password lcd $localpath1 cd $remote_path bi prompt mget $c_filename prompt " } |ftp -i -n -v 2>&1 done I want to do the similar thing using sftp instead of ftp.

    Read the article

  • bash/ksh/scripting eval subshell quotes

    - by jhon
    Hi tehere, I'm using ksh and have some little troubles, could you help me? why does not this code run? [root]$ CMD="ls -ltr" [root]$ eval "W=$( $CMD )" [root]$ ksh: ls -ltr: not found. [root]$ echo $W and this works fine: [root]$ CMD="ls -ltr" [root]$ eval 'W=$('$CMD')' [root]$ echo $W Thanks :-)

    Read the article

  • Praat scripting

    - by Binaryrespawn
    Hi all, I am trying to write a praat script to do preprocessing on hundreds of speach samples. I need to extract speech features from each sample and feed these as imputs into a feed-forward neural network. I have already constructed the network using math-lab. However, learing to script in praat is proving to be quite a challenge given my time constraints. Some of my samples are 0.01 to 0.03 seconds in length, I was looking at standardising the duration for all samples using Pitch Synchronous OverLap-Add(PSOLA). However this will be very tedious if I were to do this for every sample. Is there any script that can read in all of my files and perform the operations in a batch mode? Any guidance will be surelly appreaciated. Regards.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >