Options

WshShell.SendKeys('%{F4}') Command

Vineeth.RVineeth.R Member Posts: 121
Dear All,

My customer is using 2009 Classic, They do not want users with same ID to login twice.

I tried the WshShell.SendKeys('%{F4}') in Codeunit 1 'CompanyOpen' trigger, and it works but the problem is I am not able to throw any message before killing the session.

Can someone advise how can i display a message before killing the session. Once they press ok on the message then the session should be killed.

Thanks in Advance...
Thanks and Regards
Vineeth.R

Comments

  • Options
    william_akihisawilliam_akihisa Member Posts: 14
    hi,

    try this :

    if confirm('your message',true) then
    begin
    if isclear(wshshell) then
    wshshell.create;

    WshShell.SendKeys('%{F4}');
    end;
  • Options
    KeeperRUKeeperRU Member Posts: 58
    IF ISCLEAR(WshShell) THEN
    CREATE(WshShell);

    SecToWait := 0;
    MessageType := 16;
    TitleText := 'blablabla error';
    StringText := 'Permissions you dont have, mmm <(-_-)> ';

    WshShell.Popup(StringText, SecToWait, TitleText, MessageType);
    WshShell.SendKeys('%{F4}');

    OR Use Confirm
  • Options
    Vineeth.RVineeth.R Member Posts: 121
    Thank You KeeperRU and william_akihisa both your ideas worked well. :)
    Thanks and Regards
    Vineeth.R
Sign In or Register to comment.