Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best scripting language for Windows GUI EXE [closed]

I'm writing a simple WMI-based monitor application that sends monitoring data over a TCP Network socket to an Android app. I have no issue writing the Android App with Titanium Mobile (JavaScript) so that it creates a socket and accepts the data. However I'm looking for the best (easiest and fastest) way to get the WMI data and send it over the TCP socket but with a VERY basic Windows GUI. The only reason for the GUI at all is so the user knows the software is running, and possibly they will enter IP here to connect to the android over wifi. Here's my situation so far:

  • PHP and JavaScript are my strongest languages (being a web dev). I can write WMI/COM scripts with PHP and compile with Bamcompile to a Windows command line EXE. It only supports PHP4 and I'm not sure which GUI toolkit (if any) will work with it as it is so old, but I still prefer it for my basic Windows stuff.
  • I've been playing around with Perl (Strawberry Perl) and realising its potential. But seeing as my main programming PC is on a proxy I'm having trouble getting Tk installed, so again I'm without the GUI stuff. I've tried "ppm install Tk" and "cpan Tk" and have put in all my proxy details, it's even downloading lots of data/modules but I'm getting errors that I have no idea how to solve as I'm not yet a Perl person.
  • I have tried WinBinder for PHP and double clicking the Windows .phpw files seems to work, but I'd have to package the whole thing up somehow and also the command prompt window in the background looks messy.
  • I could use AutoIT 3 - it does GUI, sockets, all that sort of stuff, and compiles to EXE, but I would really prefer PHP or Perl for the learning experience and I'm just more used to their syntax.
  • Python looks great but a bit different to PHP or Perl so I'm not going to spend the time to learn it just at the moment. Will probably switch to it down the line though as it seems to have a very interesting structure.

I suppose the main issue I'm facing is that I could write this app for PHP and just Bamcompile it but I need to get the users input and let them know that something is running. I also presume using something like Wapache to just show a web browser with no toolbar wouldn't work because the PHP has to run in a continuous loop and that would crash any "browser"? Will this work?

set_time_limit( 0 ); // 0 means never timeout

ignore_user_abort(true); // continue running when browser closes

So any ideas? Jscript and JSC ?

Bear in mind that I don't want to learn any Microsoft .Net stuff or complex C languages, or Java.

I'm sure I can do something like this with my current skills in PHP / JavaScript? No?

like image 971
TheDavil Avatar asked Apr 02 '12 11:04

TheDavil


1 Answers

I too had problems installing the Tk module for my Strawberry Perl, but found that it installs manually just fine. Take a look at

perldoc permodinstall

to understand the process.

Perhaps the simplest way - if your CPAN is downloading packages correctly - is to run the cpan shell and say

cpan> look Tk

which will download and unpack the module for you and then shell out to a command prompt with the unpack directory as your current location. Here you can go ahead and say

perl MAKEFILE.pl
dmake
dmake test
dmake install

as described in perlmodinstall. (dmake is the flavour of make used by Strawberry Perl.)

My personal preference for a GUI library is the wxWindows API Wx which is designed from the ground up to be portable and has a look and feel that depends on the platform where it is running. But you are likely to get more help using Tk, so the choice is yours.

like image 75
Borodin Avatar answered Oct 21 '22 23:10

Borodin