+ Post New Thread
Results 1 to 2 of 2
Windows 7 Thread, snap folders using whscript in Technical; One of the things that was really poplur with teachers is my last school was the fact that they could ...
  1. #1

    Join Date
    Apr 2011
    Location
    London
    Posts
    39
    Thank Post
    6
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    snap folders using whscript

    One of the things that was really poplur with teachers is my last school was the fact that they could customize the childs desktop (via the ergo grid menu) based on the lesson they are delivering.

    This is very similar to putting desktop icons on on a restricted, but shared (student)desktop, except desktop icons on shared desktop is better in that its realtime, you don't have to log out and log back to get the new icons.

    Anyway, I tried to replicate this but also trying to avoid it being too clicky/fiddly (for teachers) etc, I have had partial success and need a bit of help.

    Basically what I' m trying to do is write a script that will open two windows ('programs bank' and 'class shared desktop'), then snap 1 to the left and the other to the right (all the clients are windows 7 pro)

    The keyboard keys to snap is 'Windows key' and left arrow key (for left snap) and right arrow key (for right snap). There doesn't appear to be a script key code for the 'windows key' so I tried to use CTRL, ESC which is "^{ESC}". but this has not worked.

    Does anyone have any suggestions suggestions? Here's my script. the script opens both windows, but does not snap.

    set WshShell = WScript.CreateObject("WScript.Shell")

    'Open the first Windows
    wshShell.Run("C:\WINDOWS")
    WshShell.SendKeys "^{ESC}{LEFT}"

    'open the second window
    wshShell.Run("C:\newfolder")
    WshShell.SendKeys "^{ESC}{RIGHT}"

    'set wshshell = nothing

  2. #2

    Join Date
    Apr 2011
    Location
    London
    Posts
    39
    Thank Post
    6
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    ok ditched the shell script method and used auto it instead. Basically compiled the following code into an .exe with AutoIT AutoItScript - AutoItScript Website

    Run("explorer.exe " & "c:\drivers")
    WinWaitActive("drivers")
    Send("#{LEFT}",0)

    Run("explorer.exe " & "c:\")
    WinWaitActive("OS (C")
    Send("#{RIGHT}",0)

SHARE:
+ Post New Thread

Similar Threads

  1. Remove Folders Using CMD
    By Hightower in forum Scripts
    Replies: 5
    Last Post: 18th September 2009, 02:30 PM
  2. Replies: 3
    Last Post: 16th February 2009, 09:36 PM
  3. how to copy folder using putty
    By ranj in forum *nix
    Replies: 2
    Last Post: 26th June 2008, 05:46 PM
  4. Delete a folder using Vbscript
    By soze in forum How do you do....it?
    Replies: 1
    Last Post: 2nd June 2008, 08:59 PM
  5. Delete a folder using scripting
    By FN-GM in forum Scripts
    Replies: 15
    Last Post: 22nd December 2007, 04:44 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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