Jump to content
Sign in to follow this  
kuhicop

SplashImageOn - Not working

Recommended Posts

Hello, I'm trying to build some script with SplashImageOn, the idea is to show an image on top of the screen.

But I don't know why it's not showing anything, I press "t" and nothing happens...

#include <Date.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

HotKeySet("t","test")

Global $title = "Time now: " & @HOUR & ":" & @MIN
Global $image = "images\karanda0015.jpg"

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 615, 437, 192, 124)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

Func test()
If Not FileExists($image) Then
    MsgBox(16,"ERROR","Unable to find " & $image)
EndIf
SplashImageOn($title,$image,250,200,6,5)
Sleep(5000)
SplashOff()
EndFunc

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
    ;Loop()
WEnd

 

Share this post


Link to post
Share on other sites

Open your image with Paint and then resave it, for some reason some images get corrupted and won't display, but I've tested the code and it works fine.

Share this post


Link to post
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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By The_Key_Maker
      Hi guys, 
      I have the latest Scite installed (SciTE4AutoIt3 3.6.2 - Feb 15 2016 18:42:26), running on Windows 7.
      I tried running Scite in parallel to AutoIT, with running manually in the command line "C:\Program Files (x86)\AutoIt3\SciTE\Koda\FD.exe" /Scite,
      It didn't work, and ever since, I can't activate Koda from the AutoIT Tools menu. 
      I get the same error (only by trying to open Koda): %1 is not a valid Win32 application.
       
      Can someone please help me?
       
    • By The_Key_Maker
      Hi guys, 
      I have the latest Scite installed (SciTE4AutoIt3 3.6.2 - Feb 15 2016 18:42:26), running on Windows 7.
      I tried running Scite in parallel to AutoIT, with running manually in the command line "C:\Program Files (x86)\AutoIt3\SciTE\Koda\FD.exe" /Scite,
      It didn't work, and ever since, I can't activate Koda from the AutoIT Tools menu. 
      I get the same error (only by trying to open Koda): %1 is not a valid Win32 application.
       
      Can someone please help me?
       
    • By timmy2
      To save future readers a little sweat I'm editing my original post to insert the following:
      After trying various suggested scripting approaches, some of which introduced new problems and some which had the same problem described here, I tried my script and a few others on another computer. No white flashes, tears, glitches. So I brought it back to my main box and disabled the Intel GPU that was feeding a 3rd monitor. Down to two monitors connected to a single NVidia GPU the visual glitches disappeared. Who would'a thought?!
      That said, some of the replies that follow provide valuable insights into the various ways to skin this cat using AutoIt.  Some suggested scripts introduced new problems so they might be instructive about approaches to avoid. Ultimately, JohnOne suggested an elegantly simple script that perfectly accomplishes my goal.
      ---------------------
      I want to display a  800x600 picture (i.e., not full-screen) without a border, close-box, title, etc.  I then want to replace that picture with another one -- cleanly. Think of an old-fashioned dual-projector slide show where there's no black-out or other interruption to the image on screen. This way I can start with a background image, then add elements to it seamlessly (once called "a build", i.e., pseudo-animation).  The image format doesn't matter to me.
      I can't use an animated GIF or video because my code is doing things in the background between images, so timing varies.
      I'm having bad luck using an AutoIt form to accomplish this (GUICtrlCreatePic, followed by subsequent GUICtrlSetImage's).  The result is a glitch -- usually a white flash or tear in the picture -- at almost every image change. (see 10/10/13 post entitled "random visual glitch when using GUICtrlSetImage"). So I guess that's out.
      SplashImageOn  blanks out the first image before displaying the next (like a single-projector slide show), so it's not seamless -- plus there's still a tiny border visible.
      $var = Default SplashImageOn("","image1.bmp",$var,$var,$var,$var,1) sleep(2000) SplashImageOn("","image2.bmp",$var,$var,$var,$var,1) sleep(2000) SplashImageOn("","image3.bmp",$var,$var,$var,$var,1) sleep(2000) Any suggestions?
×
×
  • Create New...