Jump to content

Kioskwatch


MJB
 Share

Recommended Posts

Hi All,

I've been trying to get the kioskwatch3 to work on XP with IE8

I have it running OK but with one problem, when the 2 minutes of inactivity is reached it closes IE but then it starts to close all other open windows at 2 minute intervals.

Here is the amended code:

; kioskwatch3.au3
; March 9, 2004

; Built with AutoIt3
; Starts Internet Explorer in Kiosk Mode and
; prevents any (Ctrl +) HotKeys from being used.

; March 3, 2004: Added Maintenance Mode
; Maintenance Mode starts a Command Prompt
; March 4, 2004: Script now block (Alt + Tab),
; and will close any Pop-up windows
; March 9, 2004: Added the function to check for 2 minutes of Idle Time

Global $StartTime

; Read in Maintenance Password
$maintpw = IniRead("C:\kw3.ini", "Settings", "PW", "")

Call ("StartTimer")

Run("C:\Program Files\Internet Explorer\iexplore.exe -k http://www.google.com/")


AutoItSetOption("WinTitleMatchMode", 2);2 = Any Substring

While 1;Infinite Loop

; Handles IdleTime

  $MPos1 = MouseGetPos()
  $CPos1 = WinGetCaretPos()

; Handles Hotkeys

  If WinActive(" - Microsoft Internet Explorer") Then
    HotKeySet("!{TAB}", "Block")
    HotKeySet("^h", "Block")
    HotKeySet("^a", "Block")
    HotKeySet("^b", "Block")
    HotKeySet("^c", "Block")
    HotKeySet("^f", "Block")
    HotKeySet("^l", "Block")
    HotKeySet("^n", "Block")
    HotKeySet("^o", "Block")
    HotKeySet("^p", "Block")
    HotKeySet("^s", "Block")
    HotKeySet("^v", "Block")
    HotKeySet("^w", "Block")
    HotKeySet("^x", "Block")
    HotKeySet("^!z", "Maintenance")
  EndIf

; Block Pop-ups

  If WinExists("Connect to URL") Then
    WinClose("Connect to URL")
  EndIf

  If WinExists("Microsoft Internet Explorer", "&Yes") Then
    WinActivate("Microsoft Internet Explorer", "&Yes")
    Send("!y")
  EndIf

; Handles IdleTime (Continued)

  $MPos2 = MouseGetPos()
  $CPos2 = WinGetCaretPos()

  If $MPos1[0] <> $MPos2[0] Then
    Call("StartTimer")
  ElseIf $CPos1[0] <> $CPos2[0] Then
    Call("StartTimer")
  EndIf

  $EndTime = TimerDiff($StartTime)

  If $EndTime > 120000 Then;120000 = 2 minutes
    Call("CloseIE")
;   ProcessClose ("iexplorer.exe")
  Send("!{F4}");Closes the Internet Explorer Window
  Call("StartTimer")
  EndIf

  Sleep(3);Reduces the load this script puts on the CPU time
WEnd

Func Block()
EndFunc

Func StartTimer()
  $StartTime = TimerInit()
EndFunc

Func CloseIE()
  $title = WinGetTitle(" - Microsoft Internet Explorer")
  If $title <> "MyView - Microsoft Internet Explorer" Then
    Send("!{F4}");Closes the Internet Explorer Window
  EndIf
EndFunc

Func Maintenance()
  $Password = InputBox("AutoIT3 - KioskWatch3 Maintenance Mode", "Enter KioskWatch3 Maintenance Mode Password:", "", "*")
  If $Password = $maintpw Then
    Run("cmd")
  Else
    MsgBox(0, "AutoIT3 - KioskWatch3 Maintenance Mode", "Invalid Password!", 3)
  EndIf
EndFunc

Can anyone help with where I'm going wrong.

Cheers

Link to comment
Share on other sites

Its not really answering your question as such but Opera has a kiosk mode inbuilt using CmdLine Switches >> http://www.opera.com/support/mastering/kiosk/

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Link to comment
Share on other sites

  • 3 weeks later...

OK, got this running nicely now but have one problem, embeded links within the webpage open in a new window and in full screen.

Any way of getting these links to open in kiosk mode also?

I have no control over the links by the way.

Thanks in advance.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...