Script Example : TRANSPARENCE

Example scripts and tips (replaces Old Scripts & Tips archive)

Moderators: Dorian (MJT support), JRL, Phil Pendlebury

Post Reply
ABIVEN
Pro Scripter
Posts: 71
Joined: Sun Aug 07, 2005 7:22 pm
Location: PARIS

Script Example : TRANSPARENCE

Post by ABIVEN » Thu Jul 04, 2013 12:06 pm

Re edited

Hello,

Thanks to old posts (from JRL and Others) here is a little macro which returns the screen transparent.
Requires an hotkey (for example SHIFT ALT T).
In particular , works fine with Word or Excel full screens .
Tested with W7 PRO and 1024*768 screen resolution

Code: Select all

let>MSG_HEIGHT=200
let>MSG_WIDTH=500

Messagemodal> Returns THIS screen transparent %CRLF% After reading this message and pressing OK , put the cursor on a zone (color) you want get transparent and ... wait ~5 secondes .%CRLF% Transparent screen disappears after 30 secondes
let>wa1=0.3
wait> 2
// Choice of the future transparent color (named Couleur)
GetCursorPos>A,B
Wait>wa1
GetPixelColor>A,B,Couleur
Wait>wa1

Press Print Screen
Wait>wa1
run>C:\Windows\System32\mspaint.exe
wait>0.5
Press Ctrl
Wait>wa1
send>v
Wait>wa1
Release Ctrl
Wait>wa1
Press Alt
Wait>wa1
send>f
Wait>wa1
Release Alt
Wait>wa1
Press tab*3
Wait>wa1
Press Enter
wait>0.3

// Transcient saving into C:\Users\user\Pictures
Send>C:\Users\user\Pictures\Clipboard.png
wait>0.3
Press Enter
Wait>wa1
Press Left
Wait>wa1
Press Enter
Wait>wa1
Press Esc
Wait>wa1
Press Alt
Wait>wa1
send>f
Wait>wa1
Release Alt
Wait>wa1
Press tab*5
Wait>wa1
Press tab*5
Wait>wa1
Press Enter
wait>0.3
// Suppose a 1024*768 screen resolution ; modifié ici en 868

Dialog>Dialog11
   Caption=TRANSPARENCE
   Width=1100
   Height=750
   Top=2
   Left=2
   Label=g,6,6
   Image=C:\Users\user\Pictures\Clipboard.png,4,4,1024,868
EndDialog>Dialog11

//make selected color (Couleur)transparent

SetDialogObjectFont>Dialog11,msLabel11,WebDings,720,1,Couleur

  Let>GWL_EXSTYLE=-20
  Let>WS_EX_LAYERED=524288
  Let>LWA_COLORKEY=1
  LibFunc>user32,GetWindowLongA,attribs,Dialog11.handle,GWL_EXSTYLE
  Let>attribs={%attribs% OR %WS_EX_LAYERED%}
  LibFunc>user32,SetWindowLongA,swl,dialog11.handle,GWL_EXSTYLE,attribs
  LibFunc>user32,SetLayeredWindowAttributes,res,Dialog11.handle,Couleur,0,LWA_COLORKEY


Show>Dialog11
Wait>wa1

//Transparent screen disappears after 30 secondes

wait>30
//wait>0.05
//PlayWav>c:\windows\media\favsound.wav
Exit
Last edited by ABIVEN on Sat Jul 06, 2013 4:01 am, edited 1 time in total.

User avatar
CyberCitizen
Automation Wizard
Posts: 721
Joined: Sun Jun 20, 2004 7:06 am
Location: Adelaide, South Australia

Post by CyberCitizen » Fri Jul 05, 2013 5:15 am

Doesn't Work For Me, I Have Another Screen Capture Program Mapped.
FIREFIGHTER

ABIVEN
Pro Scripter
Posts: 71
Joined: Sun Aug 07, 2005 7:22 pm
Location: PARIS

Post by ABIVEN » Fri Jul 05, 2013 5:20 pm

Sorry Cybercitizen

I supposed Directory C:\Users\user\Pictures
and file C:\Windows\System32\mspaint.exe
were universal

too bad

ABIVEN
Pro Scripter
Posts: 71
Joined: Sun Aug 07, 2005 7:22 pm
Location: PARIS

Post by ABIVEN » Sat Jul 06, 2013 3:54 am

.

Problems with shortcuts detected Post re edited

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