-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwidth.au3
34 lines (23 loc) · 784 Bytes
/
width.au3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#cs ----------------------------------------------------------------------------
AutoIt Version: 3.3.14.5
Author: myName
Script Function:
Template AutoIt script.
#ce ----------------------------------------------------------------------------
; Script Start - Add your code below here
#Include <GDIPlus.au3>
#include <File.au3>
_GDIPlus_Startup ()
$path = FileReadLine(@ScriptDir & "\test.txt", 1)
;$path = '"' & $path & '"'
;MsgBox(16, "Found", $path)
;Sleep(1000)
$image = _GDIPlus_ImageLoadFromFile($path)
If @error Then
MsgBox(16, "Error", "Does the image file exist? " & $path)
Exit 1
EndIf
_FileWriteToLine(@ScriptDir & "\test.txt", 1, Int(_GDIPlus_ImageGetWidth($image)/960), True, True)
_GDIPlus_ImageDispose ($image)
_GDIPlus_ShutDown ()
Exit