vb script 1025 error

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
johnc3640
Newbie
Posts: 9
Joined: Tue Oct 26, 2004 2:23 pm

vb script 1025 error

Post by johnc3640 » Thu Jul 12, 2012 4:33 am

I am puzzled why the following code returns a compilation error :1025.

I would appreciate any suggestions. Thanks.

The code is as follows:

VBSTART
Option Explicit

Dim handleW1 As Long

Private Declare Function FindWindowA Lib "user32"(ByVal lpClassName As String,ByVal lpWindowName As String) As Long

Private Declare Function SetWindowPos Lib "user32"(ByVal handleW1 As Long,ByVal handleW1InsertWhere As Long, ByVal w As Long,ByVal x As Long, ByVal y As Long, ByVal z As Long,ByVal wFlags As Long) As Long

Const TOGGLE_HIDEWINDOW = &H80
Const TOGGLE_UNHIDEWINDOW = &H40

Function HideTaskbar()
handleW1 = FindWindowA("Shell_traywnd", "")
Call SetWindowPos(handleW1, 0, 0, 0, 0, 0, TOGGLE_HIDEWINDOW)
End Function

Function UnhideTaskbar()
Call SetWindowPos(handleW1, 0, 0, 0, 0, 0, TOGGLE_UNHIDEWINDOW)
End Function
VBEND

VBEval>HideTaskbar

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Fri Jul 13, 2012 10:16 pm

That code is not VBScript. It will not work in Macro Scheduler. VBSTART .. VBEND blocks work only with valid VBScript.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts