Page 1 of 2 12 LastLast
  1.    03 Sep 2016 #1
    Join Date : Nov 2015
    Posts : 77
    Windows 10 Pro TH2

    I need a simple script to initiate whenever Word 2016 closes


    Good morning guys,

    I want some help from you guys as you can tell from the title I need a simple .bat or any type of script that initiate my .reg
    file on my desktop when my Microsoft word 2016 closes

    and this should happen without any dialogues boxes simply means I don't want any interruptions from any dialogues boxes asking for user permission it should happen silently.

    Thanx guys for reading my request
      My ComputerSystem Spec
  2.    03 Sep 2016 #2
    Join Date : Aug 2014
    Forever West
    Posts : 3,913
    Win10 Home and Pro, Win10 Insider Preview, Win7 Home, Linux Mint

    Just a question: Does that mean you want no prompts as to saving or discarding a new document, changes to an existing document or template when you close Word?
      My ComputerSystem Spec
  3.    03 Sep 2016 #3
    Join Date : Nov 2015
    Posts : 77
    Windows 10 Pro TH2
    Thread Starter

    Quote Originally Posted by Berton View Post
    Just a question: Does that mean you want no prompts as to saving or discarding a new document, changes to an existing document or template when you close Word?
    Actually I think you misunderstood it script shouldn't have any connection with word 2016 aside when the user closes down the word. then script should do what it's told to do

    P.S. I think you misunderstood it because of my english as you can see my english isn't really that good so sorry for that
      My ComputerSystem Spec
  4.    03 Sep 2016 #4
    Join Date : Aug 2014
    Forever West
    Posts : 3,913
    Win10 Home and Pro, Win10 Insider Preview, Win7 Home, Linux Mint

    Quote Originally Posted by Droyk View Post
    Actually I think you misunderstood it script shouldn't have any connection with word 2016 aside when the user closes down the word. then script should do what it's told to do

    P.S. I think you misunderstood it because of my english as you can see my english isn't really that good so sorry for that
    What is it that needs to happen after Word is closed? I recall from my DOS days some 20+ years ago that a batch file could be written to open a program, remain in memory then when the program was closed run another program or command. That most likely won't work in Windows as beginning with Windows 95 the Disk Operating System started being blended into the GUI/Graphical User Interface, quite different from Windows 3.11 and earlier where DOS was installed first and Windows installed on top of that.
      My ComputerSystem Spec
  5.    03 Sep 2016 #5
    Join Date : Nov 2015
    Posts : 77
    Windows 10 Pro TH2
    Thread Starter

    Quote Originally Posted by Berton View Post
    What is it that needs to happen after Word is closed?
    what I mean by no dialogues should appear is because I want a script to initiate a registry file after word closes

    so basically when a user normally click on registry file it first ask for user permission like this dialog
    Click image for larger version. 

Name:	hBmbZbY.png 
Views:	22 
Size:	7.1 KB 
ID:	99635

    and then another dialog appear
    Click image for larger version. 

Name:	GQWNz67.png 
Views:	21 
Size:	5.2 KB 
ID:	99637
      My ComputerSystem Spec
  6.    03 Sep 2016 #6
    Join Date : Oct 2014
    Trnava
    Posts : 2,739
    Windows 10.4 Home 1709 x64

    regedit /s UI.reg

    But I would probably use bat instead.
      My ComputerSystem Spec
  7.    03 Sep 2016 #7
    Join Date : Nov 2015
    Posts : 77
    Windows 10 Pro TH2
    Thread Starter

    Quote Originally Posted by TairikuOkami View Post
    regedit /s UI.reg

    But I would probably use bat instead.
    Well that's what I am asking I need bat script or any other kind of script to automatically do this.
      My ComputerSystem Spec
  8.    03 Sep 2016 #8
    Join Date : Jan 2015
    UK, Midlands
    Posts : 10,446
    Win 10 Pro (1703)

    You can create a script with Autohotkey (free).

    Autohotkey is both a scripting language, and one which can manipulate and work with windows and processes.
    It has an extensive help file, and an active forum

    So you can do this: (outline only)
    Loop ; For ever
    Loop
    Until Word 2016 present
    ; Word 2016 has been detected}
    Loop
    Until Word 2016 not present
    ; Word 2016 closed}
    Execute your desired function
    End Loop {For ever}
      My ComputerSystem Spec
  9.    03 Sep 2016 #9
    Join Date : Nov 2015
    Posts : 77
    Windows 10 Pro TH2
    Thread Starter

    Quote Originally Posted by dalchina View Post
    You can create a script with Autohotkey (free).

    Autohotkey is both a scripting language, and one which can manipulate and work with windows and processes.
    It has an extensive help file, and an active forum

    So you can do this: (outline only)
    Loop ; For ever
    Loop
    Until Word 2016 present
    ; Word 2016 has been detected}
    Loop
    Until Word 2016 not present
    ; Word 2016 closed}
    Execute your desired function
    End Loop {For ever}
    Well I never tried autohot key before so by instructions I created a new script and copy paste everything so now the issue begins how to use it as someone who don't even know autohot key language how should he work with this?

    and by the way this is what my script looks like
    Code:
    #NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.; #Warn  ; Enable warnings to assist with detecting common errors.
    SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
    SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
    
    
    Loop ; For ever
    Loop
    Until Word 2016 present
    ; Word 2016 has been detected}
    Loop
    Until Word 2016 not present
    ; Word 2016 closed}
    Execute your desired function
    End Loop {For ever}
      My ComputerSystem Spec
  10.    03 Sep 2016 #10
    Join Date : Jan 2015
    UK, Midlands
    Posts : 10,446
    Win 10 Pro (1703)

    I've just outlined the basic logic.
    You'd have to learn to use Autohotkey and read the help file... were you expecting someone to write it for you?
      My ComputerSystem Spec

 
Page 1 of 2 12 LastLast


Similar Threads
Thread Forum
Jump Lists Not working for Word 2016 or Excel 2016
so jump lists via my taskbar and windows 10, I'm not having much joy :-( I've just got a new desktop (Jan 2016) with windows 10 pre-loaded and I installed office 2010 - jump lists didn't work - so I thought I'll uninstall and install office 2016...
Software and Apps
EXCEL 2016 script error when getting external (web) data
Hi there Trying to download data from web into a spreadsheet I keep getting Script Error. This worked perfectly in EXCEL 2010 (and still does). Get external data -->web The query simply takes the components of the London FTSE 100 (like the...
Software and Apps
Tab not working in Word 2016
If I enter a font type in Word 2016 and press Tab, it doesn't jump to font size, like it used to. Anyone else has the same problem?
Software and Apps
Another Windows 10 update causes trouble, this time with Word 2016
Another Windows 10 update causes trouble, this time with Word 2016 By Darren Allan, It's a minor issue, but an annoying one for some Microsoft hasn't had much luck when it comes to tweaking its various bits of software of late, and the...
Software and Apps
Word running slow on windows 10, script debug on Yahoo and Facebook
Hi, since upgrading to windows 10 Word is maddeningly slow to open and close. In fact the whole system just seems slower. Also I keep getting script debug messages, especially when using Facebook and Yahoo. Anyone help?
Windows Updates and Activation
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 04:01.
Find Us
Twitter Facebook Google+ Ten Forums iOS App Ten Forums Android App



Windows 10 Forums