Search Results

Search found 9122 results on 365 pages for 'dynamic scripting'.

Page 93/365 | < Previous Page | 89 90 91 92 93 94 95 96 97 98 99 100  | Next Page >

  • Are there any free .NET OCR libraries that will perform OCR on an application window directly?

    - by Kelsey
    I am looking for a free .NET OCR library that will be able to do OCR on a given application window or even a image in memory (I can take a snapshot of the application window myself). I have looked at tessnet2 and MODI but both require an image located on disk. I need to use OCR because the application I am trying to write a script for does some wacky stuff that cannot be read using windows API and I need to scrape data from the screen. I have tested both of tessnet2 and MODI and they both can read the text mostly but because this has to run in an enviroment that will not be able to write to disk, I need it to be able to read directly from the applciation window or some type of memory stream. I am thinking OCR is my only soution but there could be other methods that I am not thinking of. Suggestions?

    Read the article

  • Renaming and Moving Files in Bash or Perl

    - by Katie
    HI, I'm completely new to Bash and StackOverflow. I need to move a set of files (all contained in the same folder) to a target folder where files with the same name could already exist. In case a specific file exists, I need to rename the file before moving it, by appending for example an incremental integer to the file name. The extensions should be preserved (in other words, that appended incremental integer should go before the extension). The file names could contain dots in the middle. Originally, I was thinking about comparing the two folders to have a list of the existing files (I did this with "comm"), but then I got a bit stuck. I think I'm just trying to do things in the most complicated possible way. Any hint to do this in the "bash way"? It's OK if it is done in a script other than bash script.

    Read the article

  • How to group files by date using PowerShell?

    - by Shane Cusson
    I have a folder with 2000+ files. I want to count the files by date. so with: Mode LastWriteTime Length Name ---- ------------- ------ ---- -a--- 2010-03-15 12:54 AM 10364953 file1.txt -a--- 2010-03-15 1:07 AM 10650503 file2.txt -a--- 2010-03-16 1:20 AM 10118657 file3.txt -a--- 2010-03-16 1:33 AM 9735542 file4.txt -a--- 2010-03-18 1:46 AM 10666979 file5.txt I'd like to see: Date Count ---------- ------ 2010-03-15 2 2010-03-16 2 2010-03-18 1 Thanks!

    Read the article

  • how to run this qt script? (newbie question)

    - by GB_J
    I have a qt script(barchart.qs) that creates a graph for me. I don't know how i can incorporate(ie show the graph) in my qt mainwindow. Can some one please help me look at the code and what its outputs are? I tried engine.evaluate, but i do not know what is the QScriptValue i'm getting in return. Thanks sooo much. This is the script: BarChart.prototype = new QWidget; BarChart.prototype.suffix = ""; function BarChart(parent) { QWidget.call(this, parent); } // find the maximum value and widest (pixel-wise) label and suffix BarChart.prototype.showEvent = function(event) { var fm = new QFontMetrics(this); this.margin = 20; this.titleHeight = fm.height(); this.barHeight = 1.5 * fm.height(); this.barSpacing = 0.6 * fm.height(); this.maxValue = this.suffixWidth = this.labelWidth = 0; var count = 0; for (d in this.data) { this.labelWidth = Math.max(this.labelWidth, fm.width(d)); this.maxValue = Math.max(this.maxValue, this.data[d]); this.suffixWidth = Math.max(this.suffixWidth, fm.width(String(this.data[d]) + " " + this.suffix)); count++; } this.startHue = 15; this.hueDelta = 360 / count; this.size = new QSize(640, this.titleHeight + 2 * this.margin + (this.barHeight + this.barSpacing) * count); } BarChart.prototype.paintEvent = function(event) { var p = new QPainter; p.begin(this); // background and title p.fillRect(this.rect, new QBrush(new QColor(255, 255, 255))); p.drawText(0, 0, this.width, this.margin + this.titleHeight, Qt.AlignCenter, this.windowTitle, 0); var ofs = this.labelWidth + this.margin; var ww = this.width - this.suffixWidth - ofs - 2 * this.margin; var hue = this.startHue; var y = 0; p.translate(this.margin, this.titleHeight + 1.5 * this.margin); for (d in this.data) { // label on the left side p.setPen(new QColor(Qt.black)); p.drawText(0, y, this.labelWidth, this.barHeight, Qt.AlignVCenter + Qt.AlignRight, d, 0); // the colored bar var gradient = new QLinearGradient(new QPoint(ofs, y), new QPoint(ofs, y + this.barHeight)); gradient.setColorAt(0, QColor.fromHsv(hue, 255, 240)); gradient.setColorAt(1, QColor.fromHsv(hue, 255, 92)); p.setBrush(new QBrush(gradient)); p.setPen(new QColor(96, 96, 96)); var bw = this.data[d] * ww / this.maxValue; p.drawRect(ofs, y, bw, this.barHeight); // extra text at the end of the bar var text = new String(this.data[d] + " " + this.suffix); p.setPen(new QColor(Qt.black)); p.drawText(ofs + bw + this.margin/2, y, this.suffixWidth, this.barHeight, Qt.AlignVCenter + Qt.AlignLeft, text, 0); // for the next bar y += (this.barHeight + this.barSpacing); hue += this.hueDelta; if (hue >= 360) hue -= 360; } p.end(); } BarChart.prototype.wheelEvent = function(event) { this.startHue += event.delta() / 8 / 5; if (this.startHue = 360) this.startHue -= 360; if (this.startHue < 0) this.startHue += 360; this.update(); event.ignore(); } BarChart.prototype.mousePressEvent = function(event) { var fname = QFileDialog.getSaveFileName(this, "Save", ".", "*.png", 0, 0); if (fname.length > 0) { var img = new QImage(this.size, QImage.Format_ARGB32_Premultiplied); this.render(img); img.save(new QFile(fname)); } } var chart = new BarChart; chart.windowTitle = "Monthly"; chart.suffix = "reports"; chart.data = { "September" : 45, "October" : 60, "November" : 56, "December" : 0 }; chart.show(); QCoreApplication.exec();

    Read the article

  • Find all words containing characters in UNIX

    - by fahdshariff
    Given a word W, I want to find all words containing the letters in W from /usr/dict/words. For example, "bat" should return "bat" and "tab" (but not "table"). Here is one solution which involves sorting the input word and matching: word=$1 sortedWord=`echo $word | grep -o . | sort | tr -d '\n'` while read line do sortedLine=`echo $line | grep -o . | sort | tr -d '\n'` if [ "$sortedWord" == "$sortedLine" ] then echo $line fi done < /usr/dict/words Is there a better way? I'd prefer using basic commands (instead of perl/awk etc), but all solutions are welcome! To clarify, I want to find all permutations of the original word. Addition or deletion of characters is not allowed.

    Read the article

  • Logon script for a mixed operating system environment

    - by ricky2002
    Hi Friends, I have a Active Directory controller on a Windows 2003 server. My users use Windows, Linux, Mac OS, Novell Operating system on client machines. I need to create a login script which is interoperable on all the client operating systems. Any ideas would be greatly appreciated on how to accomplish this. I was searching for a script which when runs, detects the target OS type and then run the related script to that OS. Any Ideas?

    Read the article

  • Can I use an opened gzip file with Popen in Python?

    - by eric.frederich
    I have a little command line tool that reads from stdin. On the command line I would run either... ./foo < bar or ... cat bar | ./foo With a gziped file I can run zcat bar.gz | ./foo in Python I can do ... Popen(["./foo", ], stdin=open('bar'), stdout=PIPE, stderr=PIPE) but I can't do import gzip Popen(["./foo", ], stdin=gzip.open('bar'), stdout=PIPE, stderr=PIPE) I wind up having to run p0 = Popen(["zcat", "bar"], stdout=PIPE, stderr=PIPE) Popen(["./foo", ], stdin=p0.stdout, stdout=PIPE, stderr=PIPE) Am I doing something wrong? Why can't I use gzip.open('bar') as an stdin arg to Popen?

    Read the article

  • How to automate MS Outlook

    - by Omer Akhter
    I have to generate an email at end of the day (daily-status) which is templated. I have add tasks to different list and on the top, I have to have count of these tasks such as: X Tasks: 2 of 5 Y Tasks: 3 of 5 X Tasks: X Task 1 X Task 2 Y Tasks: Y Task 1 Y Task 2 Y Task 3 I don't want write code in .NET etc. Is there anyway to script outlook to update numbers above when I change the list contents automatically. Or even better, if an input box can take input for each list contents and generate the email

    Read the article

  • Visual studio use like VBA Editor

    - by pho3nix
    I want implement in my software solution an VBA editor but in c# 3.0. VBA edtior (vb 6.5) is obsolete. Microsoft have a solution for create macros and scripts editor for .net? if not how to implement a like solution?

    Read the article

  • Bourne Shell: Convert ~/Desktop to /users/me/Desktop

    - by sixtyfootersdude
    Incredably annoyed at the Java Keytool. So much so that I have created a new tag: "SunSuck". The keytool does not resolve impartial directories. Ie this works: keytool -keystore "/users/me/Desktop" ... This doesn't: keytool -keystore "~/Desktop" ... Is there something that I could call like this: keytool -keystore "$(<cmd> ~/Desktop)" ...

    Read the article

  • Controlling the scope of a document.write call coming from a third party

    - by pingrey
    Dear all, I'm writing a webpage that relies on an external javascript file (that I have no control of), which returns data by using document.write's. Is there any way to dynamically call the function without it overwriting the whole document? The most concise code I can think of is below: <html> <head> <script type="text/javascript"> function horriblefunction () { document.write("new text"); } </script> </head> <body> Starting Text... <div id="pleasewriteinme"></div> Other text... <button onclick="horriblefunction();">Click</button> </body> </html> The idea beginning that without altering "horriblefunction()" (as it's external) the new text could be placed in the div instead of overwriting the page. Is this possible or does the function have to be called inside the div as the page is created? Thanks for you help

    Read the article

  • Script throwing unexpected operator when using mysqldump

    - by Astron
    A portion of a script I use to backup MySQL databases has stopped working correctly after upgrading a Debian box to 6.0 Squeeze. I have tested the backup code via CLI and it works fine. I believe it is in the selection of the databases before the backup occurs, possibly something to do with the $skipdb variable. If there is a better way to perform the function then I'm will to try something new. Any insight would be greatly appreciated. $ sudo ./script.sh [: 138: information_schema: unexpected operator [: 138: -1: unexpected operator [: 138: mysql: unexpected operator [: 138: -1: unexpected operator Using bash -x script here is one of the iterations: + for db in '$DBS' + skipdb=-1 + '[' test '!=' '' ']' + for i in '$IGGY' + '[' mysql == test ']' + : + '[' -1 == -1 ']' ++ /bin/date +%F + FILE=/backups/hostname.2011-03-20.mysql.mysql.tar.gz + '[' no = yes ']' + /usr/bin/mysqldump --single-transaction -u root -h localhost '-ppassword' mysql + /bin/tar -czvf /backups/hostname.2011-03-20.mysql.mysql.tar.gz mysql.sql mysql.sql + rm -f mysql.sql Here is the code. if [ $MYSQL_UP = "yes" ]; then echo "MySQL DUMP" >> /tmp/update.log echo "--------------------------------" >> /tmp/update.log DBS="$($MYSQL -u $MyUSER -h $MyHOST -p"$MyPASS" -Bse 'show databases')" for db in $DBS do skipdb=-1 if [ "$IGGY" != "" ] ; then for i in $IGGY do [ "$db" == "$i" ] && skipdb=1 || : done fi if [ "$skipdb" == "-1" ] ; then FILE="$DEST$HOST.`$DATE +"%F"`.$db.mysql.tar.gz" if [ $ENCRYPT = "yes" ]; then $MYSQLDUMP -u $MyUSER -h $MyHOST -p"$MyPASS" $db > $db.sql && $TAR -czvf - $db.sql | $OPENSSL enc -aes-256-cbc -salt -out $FILE.enc -k $ENC_PASS && rm -f $db.sql else $MYSQLDUMP --single-transaction -u $MyUSER -h $MyHOST -p"$MyPASS" $db > $db.sql && $TAR -czvf $FILE $db.sql && rm -f $db.sql fi fi done fi

    Read the article

  • Windows - VBScript - Determine IP address of computer on network

    - by tward
    I have written some VBScripts to automate tasks that I perform on computers over the network. These work great for most tasks however within our network we have problems with the IP address in DNS being correct all the time. This mainly occurs with laptops where we have different IP ranges for machines on the wireless and wired network. For example a machine may boot up wired in the morning and get an IP address: 10.10.10.1 When it switches to wireless it will obtain an address in a different subnet: 10.11.10.1 When you try to connect to that machine it still returns the old IP address (10.10.10.1) even though the computer now has a new one. I have found that I can still connect to that computer's C$ share via \computer name\c$ even though the machine does not ping. Obviously there is some other kind of address resolution going on, my question is how do I harness this to allow my VBScripts connect to WMI? Thanks!

    Read the article

  • Control Windows VM from Linux Host

    - by vy32
    I am looking for a tool that will allow me to monitor and control programs running inside a Windows VM from the Linux host machine. I realize that this is similar to what a rootkit would do, and I am completely happy to use some hacker software if it provides the necessary functionality (and if I can get it in source-code form). If I can't find something, I'll have to write it using C. Probably an embedded HTTP server running on an odd port and doing some kind of XMLRPC thing. Here is the basic functionality I need: Get list of running processes Kill a process. Start a process Read/write/create/delete files I would like to: - Read contents of screen - Read all controls on screen. - Send arbitrary click to a Windows control. Does anything like this exist?

    Read the article

  • For how long can a file be locked in windows after program is closed?

    - by Skadlig
    In a couple of scripts that I use I have problem that is intermittent. Sometimes the script fails when trying to delete a file. According to the error log due to the file being accessed by an other process. I'm guessing that windows not had time to release the file after the previous operation performed on the file ended. What amount of time would be a good guesstimate after which windows should have had time to release the file again?

    Read the article

  • Run shell command from child shell

    - by LinuxPenseur
    Hi, I have a Unix shell script test.sh. Within the script i would like to invoke another shell and then execute the rest of the commands in the shell script from the child shell and exit To make it clear: test.sh #! /bin/bash /bin/bash /* create child shell */ <shell-command1> <shell-command2> ...... <shell-commandN> exit 0 What my intention is to run the shell-commands1 to shell-commandN from the child shell. Kindly tell me how to do this

    Read the article

  • flXHR - getting started (a simple question)

    - by Yaron
    Hello, I am trying to use the flXHR javascript library for making cross-domain calls. I got stuck at the begining. As they say in the docs, I copied the /deploy directory's content to a /scripts directory. All the dependencies are supposed to be included in the flXHR download. This is my html, which returns several errors: the errors: y.base_path is undefined y.checkplayer is undefined y.ua is undefined E.attachEvent is not a function thanks

    Read the article

  • how to find the percentage of free space for mapped drives ?

    - by Arunachalam
    Is it possible to programatically find the free space available in mapped drives? How to find the percentage of free space in your drive using ms-dos. It may be easy to find the free space for a drive in ur hard disc but i need to find the free-space of mapped drives. I have mapped some file servers in my systems. It is possible to see this in My Computer, but how do show it in a command prompt?

    Read the article

  • How can I create a javascript library in a separate file and "include" it in another?

    - by Jordan L. Walbesser
    First, a caveat. The main script is not run in a webpage. I will be running the .js file in Windows using Windows Script Host. The problem: I would like to create a javascript "library" containing a number of objects, each with a number of functions. I expect this library will get rather large with time and would like to keep it in a separate javascript file (let's call it Library.js). I would like to access the objects from Library.js from another script (let's call this one User.js). In essence, I am looking for something similar to the C/C++ "include" paradigm. Is there anyway to implement this in javascript? (Remember, this is not web-based)

    Read the article

  • How to get bash to insert ' in the output

    - by ~danieljamesthomas
    Hi everybody, I'm rather new to bash, and somehow just haven't found out what I'm doing wrong here: (this is a small bash script calling my generator) if [ -n $folder ]; then $zorbalocation -q $generator -f -e files=\"$lFiles\" -e folder=\"lFolder\" else $zorbalocation -q $generator -f -e files=\"$lFiles\" -e folder=\".\" fi Now, obviously I want bash to execute these commands, depending on the content of folder. But, for some reason, bash insists on putting apostrophes ( ' ) around files=... and folder =... So, it tries to execute ../../../zorba/build/bin/zorba -q generator.xq -f -e 'files="test.xqlib"' -e 'folder="."' instead of ../../../zorba/build/bin/zorba -q generator.xq -f -e files="test.xqlib" -e folder="." Does anybody know why bash insists on inserting the apostrophes there? A nice day to everyone Danny

    Read the article

  • shell script fun! performing action on each subdirectory from a given path

    - by pocketfullofcheese
    I am writing a shell script (which I suck at) and I need some help. Its a script that is moving things from git to CVS (not important). The thing is, i a file path: controllers/listbuilder/setup/SubmissionRolesListbuilderHandler.inc.php and I need to be able to do: cvs add controllers; cvs add controllers/listbuilder; cvs add controllers/listbuilder/setup; cvs add controllers/listbuilder/setup/SubmissionRolesListbuilderHandler.inc.php Can someone help me out? The best I've come up with so far is to recursively add ALL files in my working tree, but that seems overly inefficient.

    Read the article

  • Replace delimited block of text in file with the contents of another file

    - by rmarimon
    I need to write a simple script to replace a block of text in a configuration file with the contents of another file. Let's assume with have the following simplified files: server.xml <?xml version='1.0' encoding='UTF-8'?> <Server port="8005" shutdown="SHUTDOWN"> <Service name="Catalina"> <Connector port="80" protocol="HTTP/1.1"/> <Engine name="Catalina" defaultHost="localhost"> <!-- BEGIN realm --> <sometags/> <sometags/> <!-- END realm --> <Host name="localhost" appBase="webapps"/> </Engine> </Service> </Server> realm.xml <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/> I want to run a script and have realm.xml replace the contents between the <!-- BEGIN realm --> and <!-- END realm --> lines. If realm.xml changes then whenever the script is run again it will replace the lines again with the new contents of realm.xml. This is intended to be run in /etc/init.d/tomcat on startup of the service on multiple installations on which the realm is going to be different. I'm not so sure how can I do this simply with awk or sed.

    Read the article

< Previous Page | 89 90 91 92 93 94 95 96 97 98 99 100  | Next Page >