Click here to Skip to main content
15,885,537 members
Everything / Scripting

Scripting

scripting

Great Reads

by Simon P Stevens
How to set the current directory correctly when running batch scripts as administrator
by Mr. xieguigang 谢桂纲
The ShellScript is originally developed for the debugging of my "genome-in-code" virtual cell simulation engine, but now it becomes a script language for a .Net program.
by Dev Leader
With this post, we’re still just scratching the surface of what’s doable when integrating Python and C#.
by Gaurav Aroraa, Mahsa Hassankashi
In this article, we will discuss how to create npm packages/modules

Latest Articles

by jespa007
A simple script engine for C++
by Łukasz Bownik
Smallscript is a little scripting language inspired by Smalltalk syntax.
by Bruno van Dooren
How to clean up user profiles on a computer
by Mr. xieguigang 谢桂纲
R# language is a kind of R liked language implements on .NET environment

All Articles

Sort by Score

Scripting 

20 Oct 2010 by Simon P Stevens
How to set the current directory correctly when running batch scripts as administrator
14 Oct 2014 by Mr. xieguigang 谢桂纲
The ShellScript is originally developed for the debugging of my "genome-in-code" virtual cell simulation engine, but now it becomes a script language for a .Net program.
1 Oct 2013 by Dev Leader
With this post, we’re still just scratching the surface of what’s doable when integrating Python and C#.
10 Apr 2015 by Gaurav Aroraa, Mahsa Hassankashi
In this article, we will discuss how to create npm packages/modules
8 Oct 2015 by Anele 'Mashy' Mbanga
A look at a flexible Java MySQL CRUD PHP script generator
3 Aug 2022 by Mr. xieguigang 谢桂纲
R# language is a kind of R liked language implements on .NET environment
10 Jun 2014 by Anamera
This XSLT will output an Excel worksheet containing a CSV type of record collection in a more usable XML format.
10 Oct 2014 by Pavel Durov
This tip will show how to use a batch file for adb commands.
3 Jan 2024 by Łukasz Bownik
Smallscript is a little scripting language inspired by Smalltalk syntax.
16 Mar 2015 by Sander Rossel
The (long awaited) fourth in a series on web development.
28 Dec 2017 by Rubin Liu
A quick look around the different styles in the Ring programming language!
30 Aug 2010 by paladin_t
Use Twiggery as JavaME Game Scripting Language
11 Oct 2013 by ASP.NET Community
Hi everyone. We all know the role of ajax and its implementation. We can use ajax in asp.net as well as in javascript/jquery. But there is a
16 Jun 2020 by Richard Deeming
robocopy | Microsoft Docs[^] There is no support for wildcards in the source directory. You'll need to use a for loop to issue a separate robocopy command for each matching folder. FOR /D %G In ("\\networksourcepath\path\19*") DO robocopy %G...
16 Feb 2011 by jswolf19
Hashes in perl are called hashes because they store the data in a hash table. Hash tables use a hash function to calculate a key based on the value you give it and allow for fast searches at the expense of memory.Using your example, say the hash table has 26 entries, and the hash function...
26 Jun 2011 by SCraw2855
Greetings all,First of all, let me apologize for newbingly not knowing where to address this question properly, as I'm somewhat "green" behind the ears when it comes to coding. I have a feeling that the answer to my question is very easy, but I'm tired of fighting it. A friend gave me a few...
9 Sep 2011 by #realJSOP
Google reveals all.A skinned dialog in Python and MFC[^]
9 Sep 2011 by Dave Calkins
Can anyone recommend a tool for analyzing and cleaning up excess #include statements throughout a large number of source/header files which aren't actually needed? It would need to be something that could intelligently analyze the files and figure out which #include statements ARE needed to...
15 Feb 2012 by aidin Tajadod
yes, look at this linkhttp://msdn.microsoft.com/en-us/library/system.codedom.compiler.codedomprovider.aspx[^]or search for "c# codedomprovider" in google.
22 Feb 2012 by Ganesan Senthilvel
CoffeeScript code compiles one-to-one into the equivalent JavaScript, and there is no interpretation at runtime. You can use any existing JavaScript library seamlessly from CoffeeScript (and vice-versa). The compiled output is readable and pretty-printed, passes through JavaScript Lint without...
7 May 2012 by Jason Rudland
Trial of popular REST implimentations for NodeJS including the measuring of MongoDB insertion rates.
6 Dec 2015 by Krishna P Seetharaman
This tip explains about a way using PowerShell to monitor all the disabled send ports/receive locations and suspended messages and send an email about these info
29 Jun 2010 by Graham Breach
I would create a new function to check the type:function check_file_type($ext, $mime){ $allowed_types = array( 'jpg' => 'image/jpeg', // add other types here ); $ext = strtolower($ext); return (array_key_exists($ext, $allowed_types) && $allowed_types[$ext] ==...
6 Aug 2010 by E.F. Nijboer
Try this without the exit call:grep --quiet \[dbo\] %1\*.sqlif ERRORLEVEL 1 EXIT 0if ERRORLEVEL 0 EXIT 1Good luck!ps. it could also be that you need to lose the /B in the exit call...
25 Sep 2010 by E.F. Nijboer
Try enter this in the location bar: about:configPress enter and accept the terms. Maybe you can find something there. You might also want to have a look at the link below for some additional info on the configuration...
11 Dec 2010 by Utpal Das
I have found a link in Code Project http://www.codeproject.com/KB/scripting/graphic_javascript_tree.aspx posted by Emilio CL.I have used the Walker's algorithm shown in the Figure 4. in the article.I have used it to show the tree of member's sub-members of a binary MLM system. the nodes...
14 Feb 2011 by Sandeep Mewara
Have a look at similar article: http://www.sajithmr.me/check-all-checkboxes-javascript/[^]All you need is to either loop through all the controls of the form and check for the type to move ahead OR if you are fine with using jQuery then you can use jQuery to directly pick all the...
9 Sep 2011 by Jonathan [Darka]
I think that PC-Lint might be able to help with this, I'm pretty sure I've seen it warn about unused headers - I don't have it installed at the moment so can't check.
10 Sep 2011 by Philippe Mori
Doxygen can be used for that... It can build dependency graphes.And there a few tricks that can be used to do some cleanup by hand.1) Select a problematic file and add a #pragma error Is it used in it. Then compile that project. Any file that include that won't compile. Then you can...
12 Sep 2011 by Stefan_Lang
Some time ago I was faced with similar problems and spent two days solving it 'manually' by taking all the #includes out of the header files and inserting them in any cpp file that stopped compiling. Only exceptions were #includes to base classes and a few exceptions that I couldn't easily move...
15 May 2012 by Sandeep Mewara
Looks like my comment resolved the issue. So posting it here to pop the question out of unanswered questions:If you know how to unzip one, what's the issue with unzipping more than one? Can't you loop through zipped files?
28 Sep 2012 by Dylan Morley
This is a pretty good security video which shows some MVC security techniques & ways they are attacked using XSS. http://channel9.msdn.com/Events/MIX/MIX10/FT05[^]It's MVC specific, but the techniques for exploits would be the same
21 Sep 2013 by maftahur
See the power of Infragistics Ignite UI, how easy it is to configure controls for lots of functionality with very few lines of code.
9 Jul 2014 by Maximilien
(I hope I can make this clear enough)We have a "home made" scripting/macro tool that let us call most "high level" functionalities in our application; this was developed to help add automation to the application; to let use run the same set of commands automatically instead of doing them...
24 Mar 2015 by Mr. xieguigang 谢桂纲
I want to develop a simple wrapper operation to do the hybrid programming data conversion job automatically. This makes my laboratory scientific research job happy!
23 Jun 2015 by Richard MacCutchan
It is some time since I wrote any bash scripts but I think you may need something like:#!/bin/bash# find all .gz files of 10k since yesterday, and count themcd COUNT = `find . -name "*.gz" -size -10k -mtime -1 -print | wc -l`if [ $COUNT -eq 0...
29 Jul 2015 by JohnnyCee
How do I configure VS2015 to support Rosyln C# scripting? Scripting support was not part of the VS2015 RTM, so I've installed packages from roslyn-nightly and dotnet-core but I can't get past component version mismatches.1 – My goal is to embed C# expressions inside configuration-related...
17 Nov 2015 by PyroStrex
Example of loading external scripting and external XAML with VB.NET and NeoLua
29 Sep 2016 by CPallini
Well, you may hack the more by learning how to properly use Q&A.
22 Feb 2017 by Graeme_Grant
Here is a resource that will help you: Top 10 DOS Batch tips [^] - see tip 9This Command Reference[^] will come in handy too. :)
30 Aug 2018 by Richard Deeming
Using PowerShell: $files = Get-ChildItem -path C:\Data\ -filter *.txt foreach ($file in $files) { $content = Get-Content $file if ($content -match "99999999") { $content = $content -replace "99999999", $file.BaseName Set-Content $file $content } }
21 Sep 2018 by Richard MacCutchan
OK, to continue from my earlier message: 1. "Yes, I did try "redirection" but it did not work as expected." This is one of the most frustrating comments that we see in a question. We have no idea what you did expect to see or happen. And we have no idea what did happen. Without a clear...
17 Dec 2018 by OriginalGriff
Use string.Split to break each line of the input in two: string[] parts = input.Split(','); Then use string.Format to "bolt them together" again: if (parts.Length == 2) { string output = string.Format("\"{0}\",\"{1}\"", parts[0], parts[1]); ... Or even like this: if (parts.Length == 2)...
4 Jan 2020 by Richard MacCutchan
You can easily create your own project templates in Visual Studio. See Project and item template parameters - Visual Studio | Microsoft Docs[^].
28 May 2020 by F-ES Sitecore
Does the text output reflect what you would expect? Your fuel system code only sets the max value of the slider if startFuel > maxFuel, are you setting the values in the editor for when that condition isn't true? Also in ReduceFuel you set...
21 Dec 2021 by CHill60
I used to do this. 1. Write some VBA to read the contents of a text file into a table. There are many examples on the internet e.g. VBA procedure to import csv file into access[^] 2. Write another VBA function to list the files in the folder...
15 Nov 2022 by Richard MacCutchan
If you are expecting someone here to do your work for you, then I am afraid you will be disappointed. If you do not know how to write bash scripts then take a look at bash(1): GNU Bourne-Again SHell - Linux man page[^].
9 Mar 2023 by Bruno van Dooren
How to clean up user profiles on a computer
4 Dec 2009 by jyothisai15
hi i need to write stored procedure which have one parameter(this must be table name) which have to give from outside.and then while table name is given that table data have to be scripted and save as .xl extension filefor this i have ...
4 Dec 2009 by Christian Graus
wrote:please send me urgentlyThis is rude. Your need for help is not urgent to us, we are helping you for free, as our time and schedule permits. If you want to give a deadline, pay someone to help you.You want your stored proc to save the table to the server as a .xl file ? Do you...
16 Feb 2010 by Riaan Lehmkuhl
Save the following code to a .js file or add to an existing one you might have:function stringHelper() { this.isNullOrEmpty = function(str) { if (null == str) return true; str = this.trim(str); return str.length == 0; } this.trim =...
22 Feb 2010 by jamie81
can anyone help in writing the script which copy files from solaris to windows local machine without ftp
22 Feb 2010 by Abi Bellamkonda
Map the network drive use"cp [source-file] [target-file]" in solarisor"copy [source-file] [target-file]" in windows
6 Apr 2010 by Poonamol
Hi,I am a new to Unix.I want to call my C program from shell script.For that i created one simple application in C, which accepts 2 files as argument and print it.I created one shell script having following contents,cc -o Test Test.cppTest ABC.txt XYZ.txtIt works fine for me. Is it...
27 Apr 2010 by elad2109
Hi,I know it might sound silly, but I couldn't find the following commands (using a batch file): 1. delete some log from existing eventlog? 2. Read some log from an eventlog.Is there a way to count the number of current logs attached to a specific eventlog?Is...
27 Apr 2010 by Eddy Vluggen
elad2109 wrote:I couldn't find the following commands (using a batch file)They're not available as DOS-commands, but you can use VBScript[^] from the console in the same way using CScript.exe[^].As an alternative, you could opt to write a small console-application in C# or...
30 Apr 2010 by Peace ON
Can you describe your question int just 4-5 lines in clear manner without giving more details.
5 May 2010 by elad2109
Hello. I have a batch file named a.bat on a winserver2008 Desktop.That batch file only write the SessionID (from environment variable) to a local eventlog.I want to execute it remotely using cmd (otherwise the SessionName doesn't appear).so I have triedc:\PsTools\psexec.exe...
5 May 2010 by Dimitri Witkowski
Try this: psexec.exe \\ -u test2 -p -d -i "c:\Users\test-2\Desktop\a.bat"
6 May 2010 by elad2109
hey,trying to run shutdown.exe -l -t 10only showed shutdown help manual.I thought of unelegant but working solution of ping -n 10 localhost shutdown.exe -lHow wasty is that solution?I thought of downloading sleep.exe, but I want my bat file to work on...
6 May 2010 by Richard MacCutchan
elad2109 wrote:any more ideas?I'm not actually sure what you are trying to do but perhaps this information[^] will help you.
7 May 2010 by Alan N
I think you are a victim of Microsoft's woefully inadequate documentation. After a few tests I've come to the conclusion that when -t xx is referred to as a timeout for shutdown it means just that and it does not apply to log off. You should also test the -f switch as that seems to do the...
27 May 2010 by elad2109
Hi all,1. I'm trying to write a windows bat file that runs some exe,and saves it exit code in some local variable.@echo offstart %~f1but I'm missing the exit code assignment to the local variable.2. Are there any other available details I can collect from a exe...
27 May 2010 by elad2109
Hello all,I wrote a small batch file:@echo offrem runs the {arg[0].exe} - using its fully qualified name%~f1IF %errorlevel% NEQ 0 (set boolResult=False) ELSE (set boolResult=True) rem case1 EVENTCREATE /T ERROR /ID 700 /L "MyTest Application" /D "exitcode:...
24 Jun 2010 by Dr.Walt Fair, PE
I haven't used batch files for awhile, but here's how it used to work.1) If eventlog just needs to be a blank file, then you can create one by using ECHO redirected to a file name. If it needs to be some special format, then you'll need to either copy an existing file or use anotehr...
29 Jun 2010 by MicahC
I have a php script that uploads a file to the server. Currently only jpg images are allowed. How can I allow more file types to be uploaded such as mp3's, WAV, and GIF?Code Below:
6 Aug 2010 by Neil Haughton
I'm using TFSBuild/MSBuild for our nightly build process. I want to introduce a task that executes an external batch file, and fails the build if the return code is non-zero. According to the documentation a non-zero return code from an external task should fail the build.Here's my...
6 Aug 2010 by Neil Haughton
Thanks for the response. Do you mean if %errorlevel%==0 SET ERRORLEVEL=1 ?I guess you do.
6 Aug 2010 by Neil Haughton
Thanks - I'll try that and report the result.
6 Aug 2010 by Neil Haughton
It appears the TFSBuild is still not getting the errorcode back. If I amend my build script as I getExitcode=in...
6 Aug 2010 by E.F. Nijboer
The following script is working properly, you can test both results. You first need to open the command window and then execute the script. I added the /b again so the command window won't close after execution.The script below is tested by copying a file. When c:\temp\test.txt exists and...
6 Aug 2010 by Neil Haughton
I think the problem is not so much the script (my original script works in the same way as yours) but getting the errorcode back to the ExitCode property in MSBuild.
6 Aug 2010 by Neil Haughton
I think I have it working now. Thanks for the help.
11 Aug 2010 by kishoresajja
I'm want to use a pre-build event in Visual C++ 6.0 to run a script which will automatically generate a .cpp and .h files, but I am not sure how these files could add to project ... So when I build the project1) script has to generate .cpp and .h files 2) Needs to add these files to project...
12 Aug 2010 by Sauro Viti
If the generated files are always the same (same number of files and same names), you can run your script manually, then add the generated files to your project; after that, each time you rebuild the project, the files will be re-generated, then compiled.
17 Sep 2010 by Henry Minute
Have you tried googling?I just gave it a quick whirl and got lots of likely hits.
17 Sep 2010 by Sandeep Mewara
I need ............ well later!Make some effort... even doing a simple Google search can work wonders at times.Here is what is expected by enquirers:1. TRY first what you want to do!2. Formulate what was done by you that looks like an issue/not working. Try them and tell if you...
23 Sep 2010 by submarelime
ssl disabled in firefox, can't access my ff addons, can't sign in to get my yahoomail or access any secrue site!! tried editing page source, tried cleaning up cache, tried mozilla support website but can't hone in on a solution!
14 Feb 2011 by Sri9797
Hi,I'm using Master pages in my application, and the design of masterpage is like below: ...
8 Mar 2011 by Member 2818312
Problem solved. The issue was about the dll built for x32 platform. Running the script on x64 platform resulted the problem while loading the dll. WSH 5.7 on x64 platform still runs in x32 mode which explains why the script was successfully loading the dll. On the other hand WSH 5.8 runs in x64...
21 Mar 2011 by Sandeep Mewara
I am sorry but there is no quick question here. This is your college project, you should put some effort.We expect you to put some time in trying the issue that you are facing and then some time in formulating the question while posting here. :doh:Here is what is expected by...
21 Mar 2011 by Pavel Yermalovich
May be here you will find something usefull Beginning ASP.NET Security. You want to get ready solution from anybody that is unreal. You need to effort to learn this question then try to do something and just then ask here.
22 Mar 2011 by Pavel Yermalovich
Beginning ASP.NET Security[^]
22 Mar 2011 by Sandeep Mewara
This is the second time I am telling you.I am sorry but there is no quick question here. This is your college project, you should put some effort.We expect you to put some time in trying the issue that you are facing and then some time in formulating the question while posting here....
4 May 2011 by tanujm
expect -re ".*#puts $expect_out(buffer)...this is working for me now..
5 May 2011 by tanujm
so finally i got the solution: proc monitor_server {ip_server} { source "/cygdrive/e/ncp/pat/pat_config.exp" set cmd1 {ps -aef | grep reflect | grep -v grep | awk '{print $2}'} if {[catch { spawn ssh $ip_server -l root } res]} { puts $res return 0 } else { expect -re...
7 May 2011 by funniezatee
Thanks for viewing.I found my solution here: http://www.londatiga.net/it/programming/how-to-zip-files-or-folder-on-the-fly-using-php/[^]The CreateZipFile.inc.php files seems pretty high level for my understanding.Anybody care to explain a little for just for education's...
1 Jun 2011 by OriginalGriff
Don't post the same question twice: Creating Job Search Website[^] - all you do is waste space and time and annoy people, reducing your chances of a helpful answer.Have a little patience!
27 Jun 2011 by mulbert
For Example i have this mof file:#pragma namespace ("\\\\.\\Root\\subscription")instance of ActiveScriptEventConsumer as $CONSUMER{Name = "ExternalScriptConsumer";ScriptingEngine = "VBScript";ScriptFileName = "C:\\Consumer.vbs";}; instance of __EventFilter as...
9 Sep 2011 by Mobile.Instinct
I am currently planning to access my MFC Dialog based application's .dll file using Python. I am new to Python and have the latest version of Python installed i.e. 3.2. I have installed PythonWin as well, but not really sure if it would be useful or not. I have understood like the basics of...
31 Dec 2011 by Graham Breach
Do a search for "ssh certificate based authentication" - as long as it is enabled, key-based authentication should allow you to use scp between trusted hosts.
7 Jan 2012 by Thomas Mack
I've been messing with LUA in C# lately, I've managed to do quite a bit with it. The only thing I haven't figured out is how to process an event. For example, if I created a function that dynamically creates a button:Button cmdName = new Button();cmdName+= new...
15 Jan 2012 by Richard MacCutchan
need a small app(vb/32bit) to run settings above.You could use one of the free terminal programs that Google will find for you (Hyperterm, putty etc), or you could write it yourself.
15 Feb 2012 by MR. AngelMendez
Hi, I am attempting on making a simple game engine. So far I have most of the GUI down packed except for the coding part. Is there a way to allow users to script in C# while the program runs? If you need an example here is a game engine with the function that I would more or less would...
22 Feb 2012 by Sergey Alexandrovich Kryukov
Please see:http://en.wikipedia.org/wiki/CoffeeScript[^],http://coffeescript.org/[^].The question of "usefulness" makes no sense at all. You first need to understand what do you want to do.—SA
27 Mar 2012 by Member 8765455
Hey guys,I'm looking for a script that i can use to copy network folders from one location to another. I am currently doing a migration which creates a folder inside our user share as a .V2, and needs the files/folders to be placed in this new location for the app to see...
27 Mar 2012 by Ganesan Senthilvel
xcopy.exe is definitely your friend here. It's built into Windows, so it's cost is nothing. some of the options we also add include these:•/s/e - recursive copy, including copying empty directories.•/v - add this to verify the copy against the original. slower, but for the paranoid.•/h -...
28 Mar 2012 by Member 8765455
Thanks for the quick response. I was thinking on using xcopy or robocopy, but the only issue i have with either is automation. I have around 500 users that need to have files copied as mentioned above. Another catch with this is that they must have already logged into the new environment which...