Click here to Skip to main content
15,891,717 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 Title

Scripting 

22 Mar 2017 by luigidibiasi, binterlandi
Build a realtime visitors counter with AJAX and a server-side language.
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...
9 Sep 2011 by Simon Bang Terkildsen
Haven't used Python myself, yet my famous Google skills yielded some results.Googling "python call dll"[^] and reading the first couple of hits seems to indicate ctypes is what you need.15.17. ctypes - A foreign function library for Python[^]
9 Sep 2011 by #realJSOP
Google reveals all.A skinned dialog in Python and MFC[^]
21 May 2021 by webmail123
I have a batch file that is scheduled to run after every half hour in the windows scheduler. The batch file will create a text file and it will write some data into a text file. In that, I want to run a command line to count the number of folders...
12 May 2020 by Richard MacCutchan
Try this : @echo off echo # Title to be displayed echo # Purpose to count the directories in a folder rem save the count in a variable to use below dir /b /ad "C:\Users\rjmac\Documents\Code" | find /c /v"" > zz set /p count=
21 May 2021 by l o o l
You can get the value in a variable without creating/read a file and in a line.. @echo off >"c:\demo.txt" ( echo # Title to be displayed echo # Purpose to count the directories in a folder for /f %%i in ('dir/b/ad...
14 Jan 2020 by honey the codewitch
Easily add scripting support to your apps using Microsoft's active script technology
3 Jul 2019 by Prakash Singh
Resolution of Security rule has invalid Port range issue
22 Feb 2015 by Prasad_NC
Hey I am new to Google script..i have a Google sheet with 5 columns, on each column i need a button(with text 1,2,3,4,5) and on each button click i need to set text of button to corresponding cell and hide the clicked button ..is it possible ,if yes how !!
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:
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] ==...
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.
10 Oct 2014 by Pavel Durov
This tip will show how to use a batch file for adb commands.
1 Apr 2018 by JavaScrptMaster
I am trying to write a Power Shell script which will check the connection status of paired Bluetooth devices in a certain interval (15 sec) and if found the device is out of range then will lock the users system. What I have tried: In the following code I am not able to figure out how to list...
25 Jul 2019 by as7951
Experts, Need your support for this awk script. we have only one input file, all these column 1 and column 2 are in same file and have to do lookup for values in one file(column1 and column2) but output we need in another file Need to grep row whose string contains 9K from column 1. When found...
7 May 2023 by as7951
Experts, Need your support for this awk script. we have only one input file, all these column 1 and column 2 are in same file and have to do lookup for values in one file(column1 and column2) but output we need in another file Need to grep row whose string contains 9K in column 1 and then grep...
7 May 2023 by Member 10601191
/^9K/ { kees[$0]; next; } { for ( key in kees ) { # # is it part of the key ... # if ( match( key, $1) ) { if(...
21 Sep 2018 by Vaclav_
I just started using bash scripting language and having trouble understanding "command substitution " and " redirection". I am using bash man very frequently and know something about this specific subject. Here is an example of using command substitution. I used command "sed" to find line...
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...
23 Jun 2015 by Aiden.JP
I'm trying to make this bash script dispatch and email when it detects that a certain type of file (files ending in ".gz"), which was last modified 24 hours ago, is below a certain size in a directory, I currently have it running on my entire computer. (I have it set to 10 kilobytes).It just...
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...
9 Feb 2019 by Member 14144306
So I have this localhost website that shows gridview of images that can be downloaded (link button used). I created a batch file and wrote some script to import it in Windows Task Scheduler. It works fine. But now, i'm trying to make the script do the clicking. Currently, it just runs/ open the...
9 Feb 2019 by Dave Kreskowiak
You're going to have to write an application to load the web site and do the "clicking". There's nothing you can put into a batch file that will click a link.
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!
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...
15 Oct 2018 by Patrick Skelton
I have what I thought would be a dead easy question to find an answer to. Having really, really tried to get on with PowerShell, I find its syntax to be arcane to say the least. I don't doubt its power but I'm not a sysadmin and I don't do batch scripting very often. So every time I come back...
15 Oct 2018 by #realJSOP
This CP article might help: Compiling C# Code at Runtime[^] You could essentially create a CSharpScript app that loads a text file that contains C# "script" code and compile that script at runtime. You could also write pre-compiled plugins for your script runner app, and specify the DLL...
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...
18 Dec 2018 by TheChewingTurkey
Hello, I'd like to take a .CSV file that is currently formatted as: 2018-08-16 06:06:40,35.938 2018-08-16 06:09:14,35.938 2018-08-16 06:24:14,34.862 2018-08-16 06:39:14,34.862 2018-08-16 06:54:14,35.399 and have an output like this: ("2018-08-16 06:06:40","35.938") ("2018-08-16...
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)...
17 Dec 2018 by Wendelius
Based on the question title it sounds like you're trying to build INSERT statements with literal values based on the data in a CSV file. If this is the situation, I would advice not to use the data from the CSV as is since this would leave you open to SQL injections. One very simple way to...
18 Dec 2018 by TheChewingTurkey
Hello, OriginalGriff made me realize I was making things more complicated then I needed. What I ended up doing is fixing the python script generating the csv file: from gpiozero import CPUTemperature cpu = CPUTemperature() from time import sleep, strftime, time with...
28 Mar 2012 by Michael Chourdakis
Use COM and plain C++ to add scripting support automatically.
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...
6 Apr 2010 by Poonamol
Hi,I had created makefile to compile and create .exe file.but while executing makefile i am receiving following error0711-317 Error: undefined symbol: .fn_error(......)0711-345 use the -bloadmap or -bnoquiet option to obtain more information.make :...... Error 8Could you please...
25 Sep 2012 by jmh1
I need a script engine for a C# app but can’t figure out what is the best choice. I have looked around the net and found a number of possible candidates, but I think I need some advice from someone with practical experience in C# scripting. I am looking for something that is fairly easy to...
25 Sep 2012 by Mehdi Gholam
Since .net has a CodeDOM compiler it is very easy to work with and compile code snippets at runtime.The only real issue is your application architecture must support some kind of plug-in or interface for such a feature.public class pluginXYZ : IMyAppPlugin{ public object...
9 Mar 2023 by Bruno van Dooren
How to clean up user profiles on a computer
20 Nov 2012 by VIKASH RAAJ
hi, I want to get the alexa rank of my website daily through scheduling script in my hosting account. after fetching it should deliver the mail to my mail id.please share the script. script can be of any langauge but it should support the scheduling in php server.please mail me with the...
7 May 2011 by funniezatee
Hi all,I'm trying to write a php script for on the fly compression and download.I have lots of problems trying to get it working on this particular web server. This is my code:header('Content-Type: application/octet-stream');header('Content-disposition: attachment;...
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...
22 Jul 2014 by Rocky R. Fernandes
Accessing Json Data across different domain using JsonP to get arround Security warning
17 Jul 2012 by Rangaraman
I used rundll32.exe shell32.dll,Control_RunDLL telephon.cpl,,1 and rundll32.exe shell32.dll,Control_RunDLL modem.cpl,,add to get the modem tab in Phone and modem option from control panel.My intension is to navigate from modem tab to ADD -> Select "Don't detect my modem; I will select it...
17 Jul 2012 by barneyman
how about HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E96D-E325-11CE-BFC1-08002BE10318}?
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
23 Jun 2014 by shatterstar6457
I'm looking for a way/software to add visual indicators to any software, based on certain mouse location conditions for example:If my mouse hovers a menu item in a window, a tooltip popups about the menu item.I am well-aware this can be done with a general programming language to which...
9 Oct 2012 by rajnish2patel
While loading data in grid in production server I found following script Error on Page left bottom corner (This error is occurring only on production server, in local server its working fine)This error is occurring inconsistently Webpage error detailsUser Agent: Mozilla/4.0...
10 Oct 2012 by rajnish2patel
Hi I finally solved it.How I tracked it?Enabling script debugging and used fiddler 2 tool and found whats going wrong. I found some error was thrown at date parsing.What I did to solve? I wrote a method for datetime conversion aspublic static bool ValidateDate(string txtDate, string...
28 Dec 2017 by Rubin Liu
A quick look around the different styles in the Ring programming language!
18 Jun 2012 by vikram_shinde
I have a FTP server. On the FTP server, there will be log files per day and alsothere will be multiple files per day. Each file will have datetime stamp appended to filename as follows,log_date_time.csv (log_DDMMYY_HHMM.csv)Some of example filenames for same day are,...
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#.
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...
11 Dec 2010 by Sandeep Mewara
It looks like you want to ask this question to an author related to his/her article. I would suggest you to please use the forum present at the end of the article in order to reach author and get quick response. Rarely you will find authors reading this forum. Please post the same at the...
21 Jan 2010 by James Wucher
Examples of embedding the Iron Python engine in a C# form application.
7 Aug 2012 by kennysun
encrypt all stored procedures in SQL server with powershell
22 Dec 2016 by Member 12917493
Hello everybody,I have been working with Debian for a couple of months for school and because it seems really handy to work with. but now I want to make a game for in the terminal. A Higher or Lower card game (also for school but I wanted to make it before I was given this task). You have to...
22 Dec 2016 by Jochen Arndt
I did not checked all the code but this looks suspicious:if [ "$score" -ge 1 ]; then Number=$(($RANDOM % 52)) Gokkaart=${KAARTEN[$Number]} oldNumber=$Number echo "De kaart is $Gokkaart2"fiYou are assigning a new random number to $Number. So the old number is no longer...
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...
8 Oct 2020 by OriginalGriff
We can't help: we have no idea what might be "messed up" about an excel sheet, and no way to tell what it is in your specific case - remember that we can't see your screen, access your HDD, or read your mind - we only get exactly what you type to...
25 Sep 2012 by sunder.tinwar
Hi Guys,I am writing a module which will be executing any kind of shell commands related to active directory and other shell commands on a particular domain controllerSome of command are working but some of commands are not working properly. Here is the codepublic static void...
2 Mar 2010 by truthc
Greetings,(I couldn't find the answer to this in the forum of the product in question.)First an explanation and then the question.Explanation: A lighting software (Martin Light Jockey) has two parts in respect to my question, the core and a plugin (called Light Jockey Manager). The...
30 Apr 2010 by Peace ON
Can you describe your question int just 4-5 lines in clear manner without giving more details.
10 Jul 2021 by jespa007
Example game engine by using SDL2 and ZetScript
1 Jun 2011 by N Jhansi
hi i am working with umbraco,i am very new for that pls help me if anybody knows the How to create job search website in asp.net by using Usercontrols or xslt or Script
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!
23 Mar 2015 by nileshtx
I have page that with textbox's for first and last name.When i test the page and update the last name with Doe%uff1cscript%uff1ealert%uff0812345%uff09%uff1c/script%uff1 using interceptor in proxy tool like BURP suite the last name gets stored as alert(12345) in the...
23 Mar 2015 by Sergey Alexandrovich Kryukov
Please see my comment to the question, where I see some ambiguity. This article can give you some ideas: https://www.cs.ucsb.edu/~chris/research/doc/sess09_swap.pdf[^].—SA
4 Jan 2020 by Member 13926859
hello every one i spend a lot of time creating manually a windows form application and class in visuel studio that contains connection . so i want to creat a script that i can run it with cmd that creates me a new project in visual studio with windows form and a calss . i don t know houw to...
4 Jan 2020 by phil.o
Maybe that can give you a clue for starting: Extending Projects[^] Devenv command-line switches[^]
4 Jan 2020 by OriginalGriff
Try this: Adding your items to Visual Studio default files[^]
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[^].
13 Jun 2018 by Ice-Capped Mountains
AAA URL Shortener URL Here: function generatePath id="url" (path = 'url') { let characters =...
17 Oct 2020 by OriginalGriff
Repost: deleted. Answers do not change just because you don't like them. Follow the links your were given last time, and start learning.
22 Feb 2024 by Dave Kreskowiak
I don't know of any tools that will do this, the problem being the addition of a number to another in the replacement value. You will probably have to write your own tool to do this. This is mostly going to be reading a text file and string...
22 Feb 2024 by Maq47
Hello, I have a C# file that contains 591 5-digit hexadecimal numbers in the format '0x?????', and I wish to replace them with their number plus a set hexadecimal number. How can I do that, even if I have to download new software? I really do not...
22 Feb 2024 by Maq47
Okay, I am seriously facepalming right now. Easiest solution ever. Just add the value directly to every single result in Notepad++: Find: (0x[0-9A-F]{5}); Replace: \1 + 0x617A0; I have no idea why I was trying to edit the numbers themselves...
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...
31 Aug 2021 by Mehrez Kanzari
I'm trying to implement the monitor function in Python. This function must display at regular interval the date followed by the return of the "measure" function. It stops after `cycles` executions and the interval will never be less than 1. The...
26 Aug 2021 by OriginalGriff
Read the question again: you have to display a message at regular intervals. So ... the first thing you will need is a loop of some form ... Read it carefully - it tells you exactly what to do, and the code you show doesn't fit it at all!
3 Dec 2020 by Guru Deshmukh
I am unable to list the AWS ECR repositories through boto3 script. Can anyone help on the this issue. What I have tried: import boto3 client = boto3.client('ecr') response = client.describe_repositories( registryId='string', ...
3 Dec 2020 by CHill60
If that is really your script then you are looking for a repository with registryId "string" - I doubt that there are any repositories called that. You also want a repository with a blank name, and a previous call has returned a nextToken of...
26 Sep 2018 by shivam gohel
So, I am currently making an automation software for a client. It uses selenium and chromedriver. Now the chromedriver varies from os to os. Macos, linux and windows have different files of chromedriver, So if i write some code that just is independent of operating system. How should i do...
16 Nov 2017 by pavithirakc
I am trying to build a system, which when given an input, would return relevant specific information about it by scraping the web (For example: given a software name, output information about its releases). How to go about building a scraper for such a system? What I have tried: I have...
14 Feb 2014 by Member 10597584
I am using below code in windows powershell to search for a string and give filename as output if string is found.$a=Get-ChildItem -r | ? {$_.psiscontainer -eq $false} | ? {gc $_.pspath |select-string -pattern "err"}Write-host " Files with error code ERROR : $abut i want to search files...
15 Feb 2014 by notjustme
UNC paths seem to work just fine for me. What have you tried and what error messages do you get?Anyway, Get-ChildItem is gonna need the path to begin with. Using the full local path could perhaps be an option. Like... "\\d1da1723\c$\This Directory\Stuff\prdload"Or you could mount the...
15 Feb 2014 by Member 10597584
HiAfter trying your codea=Get-ChildItem "\\d1dal723\prdload" -r | ? {$_.psiscontainer -eq $false} | ? {gc $_.pspath | select-string -pattern "err"}Write-host "Files with error code ERROR :I got the below error:e term 'a=Get-ChildItem' is not recognized as the name of a cmdlet,...
31 Jul 2012 by sankar339
I want to add tab's to a web application by using script in asp.NET. How?
31 Jul 2012 by efkah
If you want to work with a Postback, just add n RadioButtons and Build n ASCX Controls and load them in the RadioButtonClick event.if you want to work without a Postback, u can use javascript to load all Tabs at once and just set the Visible Style or use AJAX to Load the Controls...
31 Jul 2012 by NothingToLoose
To achieve your requirement there are two different approaches.1) Use ajax TabPanel within ajax TabContainer..For more detail Click on below link http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/Tabs/Tabs.aspx[^]2) Use Multiview contol of asp.net with menu...Whenever user...
29 Nov 2015 by Mohammed Elmahdy
I'm creating a scripting IDE for my company and i'm using FastColoredTextBox control as a syntax editorBasically, the script will be written in VB.NET or C#.What i need is to analyze the script code as the user types and generate intellisense items based on current context just like what...
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.
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...
14 Feb 2011 by Sri9797
Hi,I'm using Master pages in my application, and the design of masterpage is like below: ...
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...
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.