Do .vx scripts have any kind of if-else construct? I've been through the documentation and Google, and I've done some experimenting as well, but have come up empty so far.
No. There is absolutely no support for conditionals.
Related
I try to use this 2 projects for primitive gui testing automation:
http://www.ptfbpro.com/
http://www.autoitscript.com/
And I can't make my choice.
Can somebody explain me: why(in 2 or 3 lines) he use one of them(or other please specify)?
I use AutoIt...
because it's free, well documented (not only) from inside of the Scite Editor and you can easily compile your script into a small executable or even create a complete GUI and there is a very good community in the forums and around here. And its Basic-Like Syntax is really easy to understand, there are functions and even a foreach-syntax, dynamic arrays and lots of additional functions from other users... There's good integration with other programming languages and from the use of so many WinAPI functions you lack of very little possibilities. It can automate IE usage without even displaying a browser window and send network packages, you can send Keystrokes like a user sitting in front of your screen and there's the AU3Record Tool which allows you to just record a Macro and replay it or save it as a script and then you can easily optimize it and edit it for your needs. Or use the AutoIt Window Info tool to see all the possible handlings for your application, you can interact with any kind of program output/display according to different algorithms you may invent.
Enough facts? ;-)
Go with Autoit3. It 's a lot more reliable, and you have a complete script language. Ptfbpro is only a tool (not free), nothing more. AUtoit3 has a lot of contributors that can help you in your process, Ptfbpro is dead.
If you want a script taht really do what you want, just go for AutoIt. Ptfbpro can't be used as a professional tool.
Autoit3 as well. You really can't beat it for being free and so easy to use.
I'm looking to pretty print SQL code. Preferably free and/or online based.
My favorite: http://www.dpriver.com/pp/sqlformat.htm?ref=g_wangz
If you have SQLNAV you May have the formatter tools as well.
They can do the job
take a look at this lightweight javascript plugin
http://www.eslinstructor.net/vkbeautify/
simply grab the code and use it.
With this plugin you can beautify not only SQL, but also XML, JSON and CSS.
Pretty useful.
I was wondering what place scripting has in today's world of IDEs and GUIs.
I'm new to programming and am wondering at what point I should, if at all, open up the PowerShell terminal for a particular task. What do people here use scripting for and how important is it to a modern developer working full time with C++/C#/Java?
In general, you will want to write a script if you ever expect to do the task more than about twice. Making a script has the following advantages:
it's not dependent on human operation (humans are fallible)
it's repeatable
scripts can be stored in source control
This is well suited to tasks such as build, deployment, and automated testing.
IDEs and GUIs don't handle the testing or deployment parts of the development process well quite yet.
Scripting is also great when you want to do something quickly just to see. Personally, I use my Python interpreter as a super-calculator all the time. I also use it to parse files, combined with regular expressions.
Scripting is also often used to allow clients to easily extend a system's behavior. Using a script language, a compiler (or even an IDE) is not necessary.
See Extending Packages with Scripting for an example in SQL Server 2008.
Another point to add is that several servers which are highly used do not have any GUI. Everything is run from a terminal. Almost everything is run through a script. While GUIs are nice, they are not going to be used all the time.
I'm planning to do a Cocoa app that requires code syntax to be colored (in all common languages). Instead of writing my own code highlighter/parser, are there any pre-made solutions available?
Thanks
You might be able to use something like Geshi, but there're also the resources listed here: http://www.cocoadev.com/index.pl?SyntaxHighlighting
Edit
More links:
Syntax Highlighting in Cocoa TextView? Experiences? Suggestions? Ideas?
http://parsekit.com/okudakit/
An excellent solution is Uli Kusterer's UKSyntaxColoredTextDocument. It is fast and has several built-in syntax parsers. It's easy to add new languages.
It's free for non-commercial use and very cheap if you want it for a commercial app.
You can also use the JavaScript library SyntaxHighlighter and embed it into a WebView into your app.
After quite a bit of research trying to solve a similar problem, the simplest approach I found by far is to use a JavaScript library for syntax highlighting combined with a WebView. Spending time writing a syntax highlighter, a fairly complex task, is probably not what you'd want to spend time on.
I settled on using the popular CodeMirror and wrote an open source wrapper for Cocoa: https://github.com/swisspol/CodeMirrorView. You can use similar approaches to wrap other JavaScript based code editors in Cocoa apps.
You can use highlight that is used in QLColorCode :) (however, it's not a Framework that you include in your code, but a command-line utility)
EDIT: Ah yeah, use Geshi, it's probably better :D
I want to parse and store the columns and values of a SQL DML (INSERT, UPDATE, DELETE) statement in C. Need the URL of the open source code or a library with which I can link my C program. The platform is SUSE Linux. Have tried to make and use libSQL unsuccessfully. A detailed answer is appreciated. Thanks.
Additional Notes: Please suggest a library/code that I can link with my C program. In my program I want to use the functions of this library to parse and use the tokens for further processing.
You can have a look at the source code for SQLite. It uses a parser called Lemon.
Links:
SQLite architecture
Lemon parser
You can also look at the source code for postgresql-plpython3. Looks like it has a pure C based SQL parser.
Link:
postgresql-plpython3 # github
I would suggest to start from the real parser of a real DBMS. There are several in free software. For instance, the parser of PostgreSQL is in the directory src/backend/parser of the distribution and is written in C and Yacc.
See the Chapter "Parsing SQL" in "Lex & Yacc"(O'Reilly) in google books http://books.google.fr/books?id=YrzpxNYegEkC&lpg=PT1&dq=bison%20flex%20sql%20grammar&client=firefox-a&hl=en&pg=PA109
Have you looked at SQLite ? It certainly does have the code to parse SQL, so maybe you could avoid reimplementing it..
ANTLR can target C, among other languages, and its catalog of premade grammars has a bunch of SQL dialects - notably MySQL and Oracle.
µSQL for C++
What is µSQL ?
µSQL is a SQL parser engine for C++ to develop SQL based applications
easily, and it supports other SQL like domain specific languages such
as UnQL and GQL too. Because µSQL is written only in old standard C++
library such as STL with ANTLR, then you can use it with many C++
compilers and platforms.
Repo on Github
The standalone SQL parser of the Hyrise database system is open source and, even though it is written in C++, it can be accessed from C and is easy to understand and modify. It utilizes bison and flex.
Not sure is there any mature C sql parser can do that easily.
Here is a Java version SQL library can do what you need exactly, it can be used to Retrieve/Refactor table & column name from a complex SQL query easily.
Have you considered writing your own using lex and yacc? (the hacker - hardcore approach)
Not trivial .. but this site might help you get started