Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 2 of 2 FirstFirst 12
Results 16 to 28 of 28
  1. #16
    Senior Coder rnd me's Avatar
    Join Date
    Jun 2007
    Location
    Urbana
    Posts
    4,273
    Thanks
    10
    Thanked 581 Times in 562 Posts
    Quote Originally Posted by martynball View Post
    Thanks, how would I got about making a GUI for the JavaScript application?
    sadly, you don't have a gui in wsh.

    you can use jscript.net (jsc.exe), which let's you use winforms, but it's easiest to just make an html/css/js win8 app using vs2012.

    or use node.js for a cross-platform javascript app.

    too many options i know, but it's better than a few years ago when we had few options.
    my site (updated 13/9/26)
    BROWSER STATS [% share] (2014/5/28) IE7:0.1, IE8:5.3, IE11:8.4, IE9:3.2, IE10:3.2, FF:18.2, CH:46, SF:7.9, NON-MOUSE:32%

  2. Users who have thanked rnd me for this post:

    martynball (05-08-2013)

  3. #17
    Regular Coder
    Join Date
    Nov 2007
    Posts
    680
    Thanks
    319
    Thanked 1 Time in 1 Post
    Another way just come to mind and it seems to be working so far. Obviously you all noticed by now that this website is simply a GUI to move photos and give the user options for printing them as products.

    So what i'm using now is a .bat file which I can call upon using PHP, so far it all works.

    PHP Code:
    $file file_get_contents("do.bat");
    $output exec($file);
    print_r($output); 
    Code:
    move "C:\xampp2\htdocs\test\images\*.jpg" "C:\xampp2\htdocs\test\new_img"
    Safety is not really a concern as the public wont have access to it. The laptop won't be connected to the internet either.

  4. #18
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,032
    Thanks
    0
    Thanked 248 Times in 245 Posts

  5. Users who have thanked glenngv for this post:

    martynball (05-08-2013)

  6. #19
    Regular Coder
    Join Date
    Nov 2007
    Posts
    680
    Thanks
    319
    Thanked 1 Time in 1 Post
    Can I turn the webpage into a HTA once it is complete?

    And i'm having an issue here. When I run this command using the above PHP what usually gets displayed is "6 file(s) moved."

    Code:
    move "C:\xampp2\htdocs\test\images\*.jpg" "C:\xampp2\htdocs\test\new_img"
    But the below code does not display anything on the page, but it does in the command prompt.
    Code:
    IF EXIST a:\ echo Drive A: is present
    IF EXIST b:\ echo Drive B: is present
    IF EXIST c:\ echo Drive C: is present
    IF EXIST d:\ echo Drive D: is present
    IF EXIST e:\ echo Drive E: is present
    IF EXIST f:\ echo Drive F: is present
    IF EXIST g:\ echo Drive G: is present
    IF EXIST h:\ echo Drive H: is present
    IF EXIST i:\ echo Drive I: is present
    IF EXIST j:\ echo Drive J: is present
    IF EXIST k:\ echo Drive K: is present
    IF EXIST l:\ echo Drive L: is present
    IF EXIST m:\ echo Drive M: is present
    IF EXIST n:\ echo Drive N: is present
    IF EXIST o:\ echo Drive O: is present
    IF EXIST p:\ echo Drive P: is present
    IF EXIST q:\ echo Drive Q: is present
    IF EXIST r:\ echo Drive R: is present
    IF EXIST s:\ echo Drive S: is present
    IF EXIST t:\ echo Drive T: is present
    IF EXIST u:\ echo Drive U: is present
    IF EXIST v:\ echo Drive V: is present
    IF EXIST w:\ echo Drive W: is present
    IF EXIST x:\ echo Drive X: is present
    IF EXIST y:\ echo Drive Y: is present
    IF EXIST z:\ echo Drive Z: is present
    pause

  7. #20
    Regular Coder
    Join Date
    Nov 2007
    Posts
    680
    Thanks
    319
    Thanked 1 Time in 1 Post
    See attachment.

    What is going on here, CMD is displaying
    Code:
    Volume in drive F is Martyn's HDD
    Volume Serial Number is 5CC6-921B
    But the PHP is only showing
    Code:
    Volume Serial Number is 5CC6-921B
    Edit: Damn sorry, forgot to unplug other monitor.
    Attached Thumbnails Attached Thumbnails Scan removable disks.-whynowork.jpg  

  8. #21
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,032
    Thanks
    0
    Thanked 248 Times in 245 Posts
    Can I turn the webpage into a HTA once it is complete?
    Yes. But it has to be pure HTML and JavaScript. No PHP. You need to use FileSystemObject which Old Pedant linked in post #8

  9. Users who have thanked glenngv for this post:

    martynball (05-08-2013)

  10. #22
    Regular Coder
    Join Date
    Nov 2007
    Posts
    680
    Thanks
    319
    Thanked 1 Time in 1 Post
    Hmm, thing is I will need PHP as I will be using databases as well, although tbf I could use JavaScript and XML documents instead?

  11. #23
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,032
    Thanks
    0
    Thanked 248 Times in 245 Posts
    You can still use a db in HTA by using ADO object.

  12. Users who have thanked glenngv for this post:

    martynball (05-08-2013)

  13. #24
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,032
    Thanks
    0
    Thanked 248 Times in 245 Posts
    You can also use VBScript instead of/along with Javascript if you know VBScript.

  14. Users who have thanked glenngv for this post:

    martynball (05-08-2013)

  15. #25
    Regular Coder
    Join Date
    Nov 2007
    Posts
    680
    Thanks
    319
    Thanked 1 Time in 1 Post
    Damn it, I started to learn ASP at college then I just switched to PHP as I prefered it, looks like im going have to learn this one now lol

    Edit: Also, how can I get Dreamweaver to recognize the HTA file type as being HTML so I get my syntax highlighting
    Last edited by martynball; 05-08-2013 at 07:36 PM.

  16. #26
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,032
    Thanks
    0
    Thanked 248 Times in 245 Posts

  17. Users who have thanked glenngv for this post:

    martynball (05-09-2013)

  18. #27
    Regular Coder
    Join Date
    Nov 2007
    Posts
    680
    Thanks
    319
    Thanked 1 Time in 1 Post
    Thanks, sorted now

    One thing I don't understand is how i'm going to run ASP code, I have enabled IIS and moved everything to the correct folder, having some issues with IIS not working, im gettings the error code:

    Code:
    HTTP Error 404.3 - Not Found
    The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map.
    Using this code in test.asp

    PHP Code:
    <% response.write("hello") %> 
    But then when that is working, it won't run in the .hta file will it? Won't I have o use an iframe to load the .asp file so it runs the server side code?

  19. #28
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,032
    Thanks
    0
    Thanked 248 Times in 245 Posts
    You don't need ASP. You are using client-side VBScript and not server-side VBScript.

    Code:
    <script language="vbscript">
    
    </script>


 
Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •