Search Results

Search found 23245 results on 930 pages for 'photoshop script'.

Page 15/930 | < Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >

  • How to write PowerShell code part 3 (calling external script)

    - by ybbest
    In this post, I’d like to show you how to calling external script from a PowerShell script. I’d like to use the site creation script as an example. You can download script here. 1. To call the external script, you need to first to grab the script path. You can do so by calling $scriptPath = Split-Path $myInvocation.MyCommand.Path to grab the current script path. You can then use this to build the path for your external script path. $scriptPath = Split-Path $myInvocation.MyCommand.Path $ExternalScript=$scriptPath+"\CreateSiteCollection.ps1" $configurationXmlPath=$scriptPath+"\SiteCollection.xml" [xml] $configurationXml=Get-Content $configurationXmlPath & "$ExternalScript" $configurationXml Write-Host 2.If you like to pass in any parameters , you need to define your script parameters in param () at the top of the script and separate each parameter by a comma (,) and when calling the method you do not need comma (,) to separate each parameter. #Pass in the Parameters. param ([xml] $xmlinput)

    Read the article

  • insert a BLOB via a sql script ?

    - by David Michel
    Hi, I have an H2 database (http://www.h2database.com) and I'd like to insert a file into a BLOB field via a plain simple sql script (to populate a test database for instance). I know how to do that via the code but I cannot find how to do the sql script itself. I tried to pass the path , i.e. INSERT INTO mytable (id,name,file) VALUES(1,'file.xml',/my/local/path/file.xml); but this fails. Within the code (java for instance), it's easy to create a File object and pass that in, but directly from a sql script, I'm stuck... Any idea ? David

    Read the article

  • PHP script to replace cgi script

    - by Bridgeyman
    Hey, I have a CGI script that uses an old database driver that is no longer supported. Instead of struggling with this old cgi script, I thought it would be easier to rewrite it in php. It works now as a php script, but I need it to be served from the same web address. When a user accesses http://somesite.com/myscript.cgi, I want it to run the php script. I tried just renaming the php script with .cgi, but that didn't work. This is on an Apache server hosted by Dreamhost. Any advice? Bridger Maxwell

    Read the article

  • Executing multiple commands from a Windows cmd script

    - by Darren Greaves
    I'm trying to write a Windows cmd script to perform several tasks in series. However, it always stops after the first command in the script. The command it stops after is a maven build (not sure if that's relevant). How do I make it carry on and run each task in turn please? Installing any software or configuring the registry etc is completely out of the question - it has to work on a vanilla Windows XP installation I'm afraid. Ideally I'd like the script to abort if any of the commands failed, but that's a "nice to have", not essential. Thanks.

    Read the article

  • Redirect PHP-Shell-Script output

    - by Corelgott
    Hi Folks, i have got a php-script foo.php #!/usr/bin/php -c /etc/php5/cli/php.ini -q <?php echo 'hello'; // & do some stuff ?> I call this script not wrapped by a sh-script but using it directly in a cron job. To get rid of it's output i normally would just create a sh-file which calls /usr/bin/php -c /etc/php5/cli/php.ini -q foo.php > /dev/null 2 > /dev/null now i'd like to do this in the interpreter-declaration of the php file it self... so i am looking for the syntax for: #!/usr/bin/php -args [file's content] > /redirect 2 > /redirect i have kind of a hard time googleing for it... so if anybody could point me into the right direction i would really appreciate it! Thx in advance Corelgott

    Read the article

  • Execuitng script in threads

    - by Pedro Magalhaes
    Hi. I wanna make an app that executes remote scripts. I am going to design it like a Windows Service that listen on tcp/ip port. Every new request I will execute a python scripts. So I can handle any number of tcp/ip request at same time, so I will need to execute python script in separate threads. How can I do that? Is that simple? The script will share some objects, like Log files(text files) and other modules. In the log file example every script will write in the same file. So the app (windows service) will be responsible for do that. I need to make this objects thread safe, right?

    Read the article

  • C# Script version of PyBinding for WPF

    - by Jim Strav
    I wrote a CSharpScriptBinding roughly equivalent to the PyBinding on CodePlex. It uses the C# script engine from http://www.csscript.net. After I wrote it, I kind of decided it might not really be something good to use. Although it caches the compiled script code as an already compiled Assembly, my concern is that I will have one temporary Assembly created each time I use the binding. Will this add up to a problem in the future? If so, maybe there is a way in the C# script engine that I don't know about to optimize this further...? Any thoughts to confirm my suspicion that this was just a bad idea (but useful excersise in learning more about bindings and converters)?

    Read the article

  • Change password in Task Scheduler in script

    - by titanium
    I'm changing password every month for all scheduled tasks I created in Task Scheduler. This is because our security policy expires our password every month. Due to increasing number of scheduled tasks I'm creating, it eats up a lot of time in just changing password within Task Scheduler. My question is: Is there a way in script to change password in one run specifying the tasks, DOMAIN\username, and password? I know there's a security risk in putting the password in script. The password in script will be removed after the running it.

    Read the article

  • Make C# source run as a script?

    - by acidzombie24
    I am doing a little scripting and i find some more power would be nice. Like the ability to keep trying to delete a file with a 1sec delay AND have it portable since i spent some time today translating a bat script to bash. I know i can use php or python but i VERY MUCH PREFER static/compile time checking. Is there a way to run C# code as a script? I am hoping i dont have to create a custom ext and write a app to dynamically compile and execute the script (i know have source to compile .js somewhere...). Does anyone know of a solution?

    Read the article

  • script validation error

    - by Kyle Sevenoaks
    Hi, there is a script in my html tag <script type="text/javascript"> function setTaxDisplay(display) { window.location.href += (window.location.href.indexOf('?') > -1 ? '&' : '?') + 'taxInclude=' + display; } </script> When passed to validation It returns that the ampersand there isn't valid, but it's absolutely vital to the function of the page, is there a way I can make the validator ignore this? I don't need to validate the page, I'm no JS expert at all I'm not sure if I can replace it with &amp;. Thanks.

    Read the article

  • Shell script syntax error: unexpected end of line

    - by user1557674
    I wrote a simple shell script to check for the existence of a xml file and if it exists, then rename an old xml file to be backup and then move the new xml file to where the old xml file was stored. #!/bin/sh oldFile="/Documents/sampleFolder/sampleFile.xml" newFile="/Documents/sampleFile.xml" backupFileName="/Documents/sampleFolder/sampleFile2.backup" oldFileLocation="/Documents/sampleFolder" if [ -f "$newFile" ] ; then echo "File found" #Rename old file mv $oldFile $backupFileName #move new file to old file's location mv $newFile $oldFileLocation else echo "File not found, do nothing" fi However, every time I try to run the script, I get 4 command not found messages and a syntax error: unexpected end of file. Any suggestions on why I get these command not found errors or the unexpected end of file? I double checked that I closed all my double quotes, I have code highlight :) EDIT: output from running script: : command not found: : command not found: : command not found1: : command not found6: replaceXML.sh: line 26: syntax error: unexpected end of file

    Read the article

  • Converting a bash script to python (small script)

    - by Mestika
    Hi, I’ve a bash script I’ve been using for a Linux environment but now I have to use it on a Windows platform and want to convert the bash script to a python script which I can run. The bash script is rather simple (I think) and I’ve tried to convert it by google by way around but can’t convert it successfully. The bash script looks like this: runs=5 queries=50 outfile=outputfile.txt date >> $outfile echo -e "\n---------------------------------" echo -e "\n----------- Normal --------------" echo -e "\n---------------------------------" echo -e "\n----------- Normal --------------" >> $outfile for ((r = 1; r < ($runs + 1); r++)) do echo -e "Run $r of $runs\n" db2 FLUSH PACKAGE CACHE DYNAMIC python reads.py -r1 -pquery1.sql -q$queries -shotelspec -k6 -a5 >> $outfile done The main command, the python read.py … etc. is another python file I’ve been given and have the arguments as you see. I know it is a lot to ask for, but it would really help me out if someone could convert this to a python script I can use or at least give me some hints and directions. Sincerely Mestika

    Read the article

  • How to setup SyntaxHighlighter with GeeksWithBlogs in about 10 minutes.

    - by mbcrump
    SyntaxHighlighter is a fully functional self-contained code syntax highlighter developed in JavaScript. Below is a sample of what it looks like in your blog. class Test { static void Main() { System.Console.WriteLine("Sample SyntaxHighlighter"); } } This tutorial will help you setup SyntaxHighlighter with GeeksWithBlogs.net in about 10 minutes. Even though this guide is specifically for GWB, you can use it on any other hosting provider that does not allow you to upload custom CSS/JavaScript. It is recommended that if you are using LiveWriter to go ahead and download Code Snippet with SyntaxHighlighter Support to integrate this functionality within Live Writer. 1) Log into GWB and select Options->Configure Now under the Custom CSS insert the following code at the top of the textbox: @import url("http://alexgorbatchev.com/pub/sh/current/styles/shCore.css"); @import url("http://alexgorbatchev.com/pub/sh/current/styles/shThemeDefault.css"); Please note that you can change the default theme by changing the shThemeDefault.css to one listed below: shThemeDefault.css shThemeDjango.css shThemeEmacs.css shThemeFadeToGrey.css shThemeMidnight.css shThemeRDark.css 2) Under the Static News/Announcements insert the following code at the top: <script type="text/javascript" src="http://alexgorbatchev.com/pub/sh/current/scripts/shCore.js"></script> <script type="text/javascript" language="javascript" src="http://alexgorbatchev.com/pub/sh/current/scripts/shBrushCSharp.js"></script> <script type="text/javascript" language="javascript" src="http://alexgorbatchev.com/pub/sh/current/scripts/shBrushJScript.js"></script> <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushJava.js' type='text/javascript'></script> <script language='javascript'> SyntaxHighlighter.config.bloggerMode = true; SyntaxHighlighter.config.clipboardSwf = 'http://alexgorbatchev.com/pub/sh/current/scripts/clipboard.swf'; SyntaxHighlighter.all(); </script> Please note that this will only give you support for Java, JavaScript and C Sharp. If you want more languages like Ruby and SQL. Then add the proper tags listed below. The reason that I didn’t add them is because I do not want to load languages that I will not be blogging about. <link href='http://alexgorbatchev.com/pub/sh/current/styles/shCore.css' rel='stylesheet' type='text/css'/> <link href='http://alexgorbatchev.com/pub/sh/current/styles/shThemeDefault.css' rel='stylesheet' type='text/css'/> <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shCore.js' type='text/javascript'></script> <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushCpp.js' type='text/javascript'></script> <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushCSharp.js' type='text/javascript'></script> <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushCss.js' type='text/javascript'></script> <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushJava.js' type='text/javascript'></script> <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushJScript.js' type='text/javascript'></script> <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushPhp.js' type='text/javascript'></script> <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushPython.js' type='text/javascript'></script> <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushRuby.js' type='text/javascript'></script> <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushSql.js' type='text/javascript'></script> <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushVb.js' type='text/javascript'></script> <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushXml.js' type='text/javascript'></script> <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushPerl.js' type='text/javascript'></script> <script language='javascript'> SyntaxHighlighter.config.bloggerMode = true; SyntaxHighlighter.config.clipboardSwf = 'http://alexgorbatchev.com/pub/sh/current/scripts/clipboard.swf'; SyntaxHighlighter.all(); </script> 3) Now install Code Snippet with SyntaxHighlighter Support and launch Windows Live Writer. Click on the PreCode Snippet plugin add copy/paste your code into the windows. Make sure you select “PRE” and the Language that you are using. It should look similar to the following screenshot.  After you finish editing the post, hit publish and your code should look nice and neat like the example shown earlier.

    Read the article

  • Script to create ODBC connection

    - by Mathew
    I need to deploy some software through SMS/SCCM and the software requires that an ODBC connection be created in Windows. The connection information I was given requires a user name and password. I have a batch script to import the connection information into the registry, however I don't know how to go about putting the user name and password in. I'd like to script this or put it in some kind of distributable package. Thanks, -Mathew

    Read the article

  • C# autocomplete not working for Script# in visual studio

    - by samwa
    Hi I'm using the fantastic project Script# (http://projects.nikhilk.net/ScriptSharp) I can't seem to get the autocomplete feature in VisualStudio 2008 working the .scriptlet files appear as plain text with no code formatting at all the version of Script# I am using is 0.5.6 I am opening the samples project and looking at HelloWorld.scriptlet Cheers Sam

    Read the article

  • Command passed as argument to shell script

    - by raj_arni
    Hi, I want to pass a command to a shell script. This command is a grep command. While executing I am getting the following errors, please help: myscript.sh "egrep 'ERROR|FATAL' \*20100428\*.log | grep -v aString" myscript.sh is a simple script: #!/bin/ksh cd log $1 the errors are: egrep: can't open | egrep: can't open grep egrep: can't open -v egrep: can't open aString Error is because egrap sees |, grep, -v and aString as arguments.

    Read the article

  • Whats wrong with my script??

    - by John Augst
    Hi guys; Could you tell me whats wrong with this script: I think the error is in IF statment <script> productID=new Array() variaveis=location.search.replace(/\x3F/,"").replace(/\x2B/g," ").split("&") if(variaveis!=""){ for(i=0;iflash1"); } else if (flash = "flash2") { document.write("flash2"); } else { document.write("another"); }

    Read the article

  • validation functions in google apps script is not working properly

    - by chocka
    I create a i/p form in google site using Apps Script and i did the validation using the Apps Script coding. Validation functions available in Apps script is not satisfying all the possibility of checking the error. function validate(e) { var app = UiApp.getActiveApplication(); var flag=0; var text = app.getElementById('name'); var textrequired = app.getElementById('namerequired'); var number = app.getElementById('number'); var numberrequired = app.getElementById('numberrequired'); var email = app.getElementById('email'); var emailrequired = app.getElementById('emailrequired'); var submit = app.getElementById('submit_button'); var valid = app.createClientHandler() .validateNumber(number) .validateNotInteger(text) .validateEmail(email) .forTargets(submit).setEnabled(true) .forTargets(number,text,email).setStyleAttribute("color","black") .forTargets(numberrequired,textrequired,emailrequired).setText('*').setStyleAttribute("color", "red").setVisible(true); var invalidno = app.createClientHandler().validateNotNumber(number).validateMatches(number, '').forTargets(number).setStyleAttribute("color", "red").forTargets(submit).setEnabled(false).forTargets(numberrequired).setText('Please Enter a Valid No.').setStyleAttribute("color", "red").setVisible(true); var validno = app.createClientHandler().validateNumber(number).forTargets(number).setStyleAttribute("color","black").forTargets(numberrequired).setText('*').setStyleAttribute("color", "red").setVisible(true); var invalidText=app.createClientHandler().validateNumber(text).validateMatches(text, '').forTargets(text).setStyleAttribute("color", "red").forTargets(submit).setEnabled(false).forTargets(textrequired).setText('Please Enter a Valid Name.').setStyleAttribute("color", "red").setVisible(true); var validText=app.createClientHandler().validateNotNumber(text).forTargets(text).setStyleAttribute("color","black").forTargets(textrequired).setText('*').setStyleAttribute("color", "red").setVisible(true); var invalidemail=app.createClientHandler().validateNotEmail(email).validateMatches(email, '').forTargets(email).setStyleAttribute("color", "red").forTargets(submit).setEnabled(false).forTargets(emailrequired).setText('Please Enter a Valid Mail-Id.').setStyleAttribute("color", "red").setVisible(true); var validemail=app.createClientHandler().validateEmail(email).forTargets(email).setStyleAttribute("color","black").forTargets(emailrequired).setText('*').setStyleAttribute("color", "red").setVisible(true); number.addKeyPressHandler(invalidno).addKeyPressHandler(validno).addKeyPressHandler(valid).addKeyPressHandler(invalidText).addKeyPressHandler(invalidemail); text.addKeyPressHandler(invalidText).addKeyPressHandler(validText).addKeyPressHandler(valid).addKeyPressHandler(invalidno).addKeyPressHandler(invalidemail); email.addKeyPressHandler(invalidemail).addKeyPressHandler(validemail).addKeyPressHandler(valid).addKeyPressHandler(invalidno).addKeyPressHandler(invalidText); if (text == ''){flag = 1;} if (email == ''){flag = 1;} if (number == ''){flag = 1;} if(flag == 1){submit.setEnabled(false);} return app; } I just placed my Validation function using Apps Script. I don't know why its not satisfying all the possibilities of the validation. And also i have to do is to enable the submit button after all the fields satisfy the validation. After once it enabled, if i make any error in any field it will not get disable correctly. I wrote the coding correctly i think so. Please take a look at my validation function and give me some suggestion to make it possible. Please guide me, Thanks & Regards, chocka.

    Read the article

  • Script Bash and History Unix

    - by user1107078
    i just start to use Script bash on UNIX and i didnt find a solution to write the first command in the history which start , for example , with ls. If i write in the shell history !ls it works but when i'm going to create a script it wont work. This is my example code #!/bin/bash set -o | grep history set -o history #echo "HISTFILE is $HISTFILE" #history "!ls"; #history #!ls history #it works Another Question why echo "HISTFILE is $HISTFILE" print me only HISTFILE is ?? Thanks

    Read the article

  • writing a shell script if statement to check for directory

    - by user1553248
    I need to write a script that will recreate my opt folder if it gets deleted when I remove a package from it. Here's a link to my previous post: dpkg remove to stop processes Now, the issue I'm running into could be better described here: http://lists.debian.org/debian-devel/2006/03/msg00242.html I was thinking of just adding a postrem script which checks if an opt directory exists, and if not, creates one. My experience with shell scripts is pretty limited though..

    Read the article

  • PHP see POST/GET values made to script dynamically

    - by minimalpop
    Hi, I've been testing a PHP script that I'm posting values to every few seconds (latitude and longitude to be specific) and am wondering if there's an easier way to see what values are being sent to the script. Right now I'm writing the data to a txt file on my server, and refreshing the page every so often to see what values have been posted recently. Is there a way to just see what's going on behind the scenes (in terminal, perhaps)? Thanks.

    Read the article

  • Ubuntu Bash Script changing file names chronologicaly

    - by Manifold
    I have this bash script where I am trying to change all *.txt files in a directory to their date of last modification. This is the script: #!/bin/bash # Renames the .txt files to the date modified # FROM: foo.txt Created on: 2012-04-18 18:51:44 # TO: 20120418_185144.txt for i in *.txt do mod_date=$(stat --format %y "$i"|awk '{print $1"_"$2}'|cut -f1 -d'.'|sed 's/[: -]//g') mv "$i" "$mod_date".txt done The error I am getting is: renamer.sh: 6: renamer.sh: Syntax error: word unexpected (expecting "do") Any help would be greatly appreciated. Thank you for your time.

    Read the article

< Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >