Author Topic: Petr's Script program in QB64  (Read 3098 times)

0 Members and 1 Guest are viewing this topic.

Offline Petr

  • Forum Resident
  • Posts: 1720
  • The best code is the DNA of the hops.
    • View Profile
Petr's Script program in QB64
« on: February 07, 2022, 10:29:56 am »
Hi guys.

This is a small program I'm working on right now. Its purpose is simply to display lyrics, subtitles, comments and / or pictures, play sounds and it's all time-controlled. It can also pause the execution and stop the presentation time. It is a very simple solution. The main goal is to make it easier to shoot videos about QB64 on YouTube - of course, subtitles can also be added there, but this solution, without the need for further editing, seemed better to me. So now all you have to do is download non-copyrighted music, take a few screenshots, translate the comments and it can be fun to create. The amazing thing about Open Source is that it can be shared like this. You will definitely have suggestions on what to add. I gradually want to do it. In the evening, I will use this program to create a presentation about why I haven't been here for a long time and then publish it on my Youtube channel.

You need the attached ZIP file to try it out. When started, the program will ask for the file name. Write there "kuci" - it is script file name, this file is also in zip file. Look in kuci file and see how it is all done.

Code: QB64: [Select]
  1. Title "QB64 Script"
  2. Type Content
  3.     Time As Single
  4.     Statement As String
  5.  
  6.  
  7. ReDim Shared Images(0) As Long, imgI
  8. ReDim Sounds(0) As Long
  9. ReDim Videos(0) As String
  10. ReDim Fonts(0) As Long
  11. ReDim My(0) As Content
  12. ReDim Clrs(2) As Unsigned Byte
  13.  
  14. Input "Input text script file name:"; script$
  15. If FileExists(script$) Then
  16.     FF = FreeFile
  17.     Open script$ For Input As #FF
  18.     While Not EOF(FF)
  19.         Line Input #FF, s$
  20.  
  21.  
  22.         '-------------------------------------- LOAD TO MEMORY AND CHECK ALL FILES IF EXISTS [STEP 1/3] ----------------------------------------------------------
  23.         'ziskat cas
  24.         sep = InStr(s$, " ")
  25.         Tim$ = Mid$(s$, 1, sep - 1)
  26.         sep = InStr(Tim$, ":")
  27.         Min = Val(Mid$(Tim$, 2, sep))
  28.         Tim$ = Mid$(Tim$, sep + 1)
  29.         Secs = Val(Mid$(Tim$, 1, sep))
  30.         sep = InStr(Tim$, ":")
  31.         Tim$ = Mid$(Tim$, sep + 1)
  32.         Set = Val(Mid$(Tim$, 1, sep))
  33.  
  34.         'cas: Min, Sec, Set
  35.         Time = (Min * 60) + Secs + (Set / 100)
  36.         My(record).Time = Time
  37.  
  38.  
  39.  
  40.         'ziskat prikaz (cmd$)
  41.         sep = InStr(s$, " ")
  42.         s$ = Mid$(s$, sep + 1)
  43.         My(record).Statement = (s$)
  44.  
  45.  
  46.  
  47.         sep = InStr(s$, " ")
  48.         cmd$ = Left$(s$, sep - 1)
  49.  
  50.         Select Case UCase$(cmd$)
  51.             Case "SCRN" '                                                        Screen settings
  52.                 'ziskat ResX
  53.                 s$ = Mid$(s$, sep + 1)
  54.                 sep = InStr(s$, " ")
  55.                 ResX = Val(Mid$(s$, 1, sep - 1))
  56.  
  57.                 'ziskat ResY
  58.                 s$ = Mid$(s$, sep + 1)
  59.                 sep = InStr(s$, " ")
  60.                 ResY = Val(Mid$(s$, sep + 1))
  61.  
  62.             Case "SIMG" '                                                       Load images to array (in my mind is already upgrade for it)
  63.                 FileName$ = Mid$(s$, sep + 1)
  64.                 If FileExists(FileName$) Then
  65.                     iU = UBound(Images)
  66.                     Images(iU) = _LoadImage(FileName$, 32)
  67.                     If Images(iU) = -1 Then Print "Error: Image file "; FileName$; " is in unsupported format.": Sleep 3: End
  68.                     ReDim Preserve Images(iU + 1) As Long
  69.                 Else
  70.                     Print "SIMG File "; FileName$; " not found. (Record nr."; record; ")": Sleep 3: End
  71.                 End If
  72.  
  73.             Case "PASS"
  74.                 '                                                              Load images to array as SIMG statement, but PASS is for other use than SIMG (look again)
  75.  
  76.                 s$ = Mid$(s$, sep + 1)
  77.                 sep = InStr(s$, " ")
  78.                 PhotoA$ = Mid$(s$, sep + 1)
  79.  
  80.                 sep = InStr(s$, " ")
  81.                 s$ = Mid$(s$, sep + 1)
  82.                 sep2 = InStrRev(s$, " ")
  83.  
  84.                 s$ = Mid$(s$, sep2)
  85.                 Effect = Val(s$)
  86.  
  87.                 PassE(psI) = Effect
  88.                 psI = psI + 1
  89.                 ReDim Preserve PassE(psI) As Integer
  90.  
  91.                 If FileExists(PhotoA$) Then
  92.                     iU = UBound(Images)
  93.                     Images(iU) = _LoadImage(PhotoA$, 32)
  94.                     If Images(iU) = -1 Then Print "Error: Image file "; PhotoA$; " is in unsupported format.": Sleep 3: End
  95.                     ReDim Preserve Images(iU + 1) As Long
  96.                 Else
  97.                     Print "PASS File "; PhotoA$; " not found. (Record nr."; record; ")": Sleep 3: End
  98.                 End If
  99.  
  100.             Case "SNDL", "SNDP" '                                                Load sounds to array
  101.                 FileName$ = Mid$(s$, sep + 1)
  102.                 If FileExists(FileName$) Then
  103.                     sU = UBound(Sounds)
  104.                     Sounds(sU) = SndOpen(FileName$)
  105.                     If Sounds(sU) = 0 Then Print "Error: Sound file: "; FileName$; " is in unsupported format,": Sleep 3: End
  106.                     ReDim Preserve Sounds(sU + 1) As Long
  107.                 Else
  108.                     Print "Sound file "; FileName$; " not found.": Sleep 3: End
  109.                 End If
  110.  
  111.             Case "SVID" '                                                       Load video file names (if file exists) to array as string (will be used later with Windows Media Player)
  112.                 FileName$ = Mid$(s$, sep + 1)
  113.                 If FileExists(FileName$) Then
  114.                     vU = UBound(Videos)
  115.                     Videos(vU) = FileName$
  116.                     ReDim Preserve Videos(vU + 1) As String
  117.                 Else
  118.                     Print "Video file "; FileName$; " not found.": Sleep 3: End
  119.                 End If
  120.  
  121.             Case "FONT" '                                                       Load font TTF, OTF file
  122.                 sep = InStr(s$, " ")
  123.                 sep2 = InStrRev(s$, " ")
  124.                 FontName$ = Mid$(s$, sep + 1, sep2 - sep)
  125.                 FontSize = Val(Mid$(s$, sep2 + 1))
  126.                 fU = UBound(Fonts)
  127.                 Fonts(fU) = LoadFont(FontName$, FontSize, "MONOSPACE")
  128.                 If Fonts(fU) = 0 Then Print "Error loading font "; FontName$: Sleep 3: End
  129.                 ReDim Preserve Fonts(fU + 1) As Long
  130.         End Select
  131.         record = record + 1
  132.         ReDim Preserve My(record) As Content
  133.     Wend
  134.     Print "Error: Script text file "; script$; " not exists."
  135.     End
  136.  
  137. ' -------------------------------------  RUN OWN PRESENTATION [STEP 2/3]  -------------------------------------------------------------------------------
  138. NullTime = Timer
  139.  
  140. If ResX > 0 And ResY > 0 Then Screen NewImage(ResX, ResY, 32) Else Print "Text mode!"
  141.  
  142. R = 0
  143.  
  144. Do Until k& = 27
  145.     k& = _KeyHit
  146.     'time is calculated from TIMER
  147.     If Timer < NullTime Then NullTime = Timer - P_time 'midnight overflow check / not tested
  148.  
  149.  
  150.     'this is console developing window, it show presentation time for us. If presentation time is the same as in your script file, then it run again, otherwise program wait.
  151.  
  152.     P_time = Timer - NullTime
  153.  
  154.     Do Until P_time > My(R).Time
  155.         P_time = Timer - NullTime
  156.  
  157.         $Console
  158.         Dest Console
  159.         Echo Str$(P_time): Echo Str$(My(R).Time)
  160.         Delay .01
  161.         Dest 0
  162.  
  163.     Loop
  164.  
  165.  
  166.     Statement$ = UCase$(Left$(My(R).Statement, 4))
  167.  
  168.     'od 05-02-2022
  169.     Select Case Statement$
  170.         Case "SIMG" '                        command: Show Image (accept ratio)
  171.             If PixelSize = 4 Then '          works just if SCRN stetement for setting graphic screen is in text file used before SIMG statement, otherwise is this skipped!
  172.                 GetImageRatio LUX, LUY, RUX, RUY, imgI
  173.                 _PutImage (LUX, LUY)-(RUX, RUY), Images(imgI)
  174.                 imgI = imgI + 1
  175.             End If
  176.         Case "SNDL"
  177.             If SndPlaying(Sounds(SoundsI)) = 1 Then SndStop Sounds(SoundsI) 'Play sound in loop
  178.             SndLoop Sounds(SoundsI)
  179.             SoundsI = SoundsI + 1
  180.         Case "SNDP"
  181.             If SndPlaying(Sounds(SoundsI)) = 1 Then SndStop Sounds(SoundsI) 'Play sound once
  182.             SndPlay Sounds(SoundsI)
  183.             SoundsI = SoundsI + 1
  184.         Case "SNDS"
  185.             SndStop Sounds(SoundsI)
  186.         Case "PASS" '                         insert a transition between photos / videos 'parameter is OPTIONAL!
  187.             Parameter = PassE(passI)
  188.             passI = passI + 1
  189.             InsertTransmission Parameter
  190.         Case "DELA" '                                        DELA statement is the same as SLEEP, it also stop time in presentation
  191.             Parameter = Val(Mid$(My(R).Statement, 5))
  192.  
  193.             StopTime = Timer - NullTime
  194.             NullTime = StopTime
  195.             If Parameter Then Sleep Parameter Else Sleep
  196.             NullTime = Timer - StopTime
  197.  
  198.         Case "SVID" '                                       For future version - PlayVideo in this version is empty SUB, in future it use SpriggsySpriggs libraries for call Windows Media Player
  199.             VideoName$ = Videos(VideoI)
  200.             VideoI = VideoI + 1
  201.             PlayVideo VideoName$
  202.         Case "FONT" '                                       View FONT. Use in file: ú[00:00:10] FONT Arial.ttf 40  <---- in step 1/3 it loads and in step 2/3 it view all text using Arial font size 40
  203.             Font Fonts(FontI)
  204.             FontI = FontI + 1
  205.         Case "STIT"
  206.             Text$ = Mid$(My(R).Statement, 5) '              Print SUBTITLE to screen (just one row in this version) use in file is: [01:00:97] STIT This is subtitle
  207.             InsertText Text$
  208.         Case "CLRS"
  209.             Cls , RGB32(Clrs(0), Clrs(1), Clrs(2)) '                 clear screen using color sets for foreground or for background color
  210.         Case "COLF" '                                                set foreground color for subtitles (STIT statement)
  211.             ReDim Clrs(2) As _Unsigned _Byte
  212.             n$ = Mid$(My(R).Statement, 5)
  213.             'Print n$
  214.             For T = 0 To 2
  215.                 sep = InStr(n$, " ") + 1
  216.                 nr$ = Mid$(n$, sep, 3)
  217.                 control = InStr(nr$, " ")
  218.                 If control Then Clrs(T) = Val(Mid$(nr$, 1, control)) Else Clrs(T) = Val(nr$)
  219.                 n$ = Mid$(n$, sep + 1)
  220.             Next
  221.  
  222.             Color RGB32(Clrs(0), Clrs(1), Clrs(2))
  223.  
  224.         Case "COLB" '                                                set background color
  225.             ReDim Clrs(2) As _Unsigned _Byte
  226.             n$ = Mid$(My(R).Statement, 5)
  227.             'Print n$
  228.             For T = 0 To 2
  229.                 sep = InStr(n$, " ") + 1
  230.                 nr$ = Mid$(n$, sep, 3)
  231.                 control = InStr(nr$, " ")
  232.                 If control Then Clrs(T) = Val(Mid$(nr$, 1, control)) Else Clrs(T) = Val(nr$)
  233.                 n$ = Mid$(n$, sep + 1)
  234.             Next
  235.  
  236.             Color , RGB32(Clrs(0), Clrs(1), Clrs(2))
  237.  
  238.         Case "TEXT" '                                                      Print centered text to screen. Use in file: [02:00:99] TEXT Here place long text which is then centered and printed to screen
  239.             n$ = Mid$(My(R).Statement, 5)
  240.             LongText n$
  241.  
  242.         Case "FSCR"
  243.             FullScreen
  244.         Case "CLSS"
  245.             Cls
  246.  
  247.     End Select
  248.     R = R + 1
  249.     If R > record Then Exit Do 'skip to phase 3 - erasing RAM and quit.
  250.  
  251. '-------------------------------------- Erase RAM, delete images and sounds from memory and then end [Step 3/3] -----------------------------------------
  252.  
  253.  
  254. For C1 = LBound(Images) To UBound(Images) - 1
  255.     FreeImage Images(C1)
  256.  
  257. For C2 = LBound(Sounds) To UBound(Sounds) - 1
  258.     SndClose Sounds(C2)
  259.  
  260. Erase Images
  261. Erase Sounds
  262. Erase Videos
  263. Erase Fonts
  264. Erase Clrs
  265. Erase PassE
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272.  
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  
  279.  
  280. Sub InsertText (T$)
  281.     TextLenght = PrintWidth(T$)
  282.     Middle = Width \ 2 - TextLenght \ 2
  283.     PrintMode KeepBackground
  284.     PrintString (Middle, Height - FontHeight - 10), T$
  285.  
  286.  
  287. Sub LongText (t As String)
  288.     TextMax = Width \ FontWidth
  289.     Rows = Len(t) \ TextMax
  290.     y = Height / 2 - (FontHeight * Rows / 2)
  291.     Tr = 1
  292.     t$ = t$ + " "
  293.     Do Until LastSpace = Len(t)
  294.         Word$ = Mid$(t, Tr, TextMax)
  295.         LastSpace = InStrRev(Word$, " ")
  296.         S$ = Mid$(Word$, 1, LastSpace)
  297.         Center = Width / 2 - PrintWidth(S$) / 2
  298.         PrintString (Center, y), S$
  299.         y = y + FontHeight
  300.         t$ = Mid$(t$, LastSpace + 1)
  301.     Loop
  302.  
  303.  
  304.  
  305.  
  306. Sub InsertTransmission (Value As Integer)
  307.     'prechody fotek, 0 = nahodny
  308.     Old = CopyImage(0, 32)
  309.     New = NewImage(Width, Height, 32)
  310.     GetImageRatio lux, luy, rdx, rdy, imgI
  311.     _PutImage (lux, luy)-(rdx, rdy), Images(imgI), New
  312.     imgI = imgI + 1
  313.     If Value = 0 Then Value = 1 + 10 * Rnd
  314.     s = 0
  315.     centerX = Width \ 2
  316.     centerY = Height \ 2
  317.  
  318.     Select Case Value
  319.         Case 1 'old image shift up, new is shift from bottom
  320.             Do Until s <= -Height
  321.                 PutImage (0, s), Old, 0
  322.                 PutImage (0, s + Height), New, 0
  323.                 s = s - 10
  324.             Loop
  325.  
  326.         Case 2 'old photo go down, new is shift from ceil
  327.             Do Until s >= Height
  328.                 PutImage (0, s), Old, 0
  329.                 PutImage (0, s - Height), New, 0
  330.                 s = s + 10
  331.             Loop
  332.  
  333.         Case 3 'old photo is shifted to right, new is comming from left
  334.             Do Until s >= Width
  335.                 PutImage (s, 0), Old, 0
  336.                 PutImage (s - Width, 0), New, 0
  337.                 s = s + 10
  338.             Loop
  339.  
  340.         Case 4 'old photo is shifted to left and new photo is comming from right
  341.             Do Until s <= -Width
  342.                 PutImage (s, 0), Old, 0
  343.                 PutImage (s + Width, 0), New, 0
  344.                 s = s + 10
  345.             Loop
  346.  
  347.         Case 5 'old photo is rewrited by circle contains new photo
  348.             Do Until s > _Pi(2)
  349.                 x1 = centerX + Cos(s) * Width
  350.                 y1 = centerY + Sin(s) * Width
  351.                 x2 = centerX + Cos(s + .2) * Width
  352.                 y2 = centerY + Sin(s + .2) * Width
  353.                 MapTriangle (centerX, centerY)-(x1, y1)-(x2, y2), New To(centerX, centerY)-(x1, y1)-(x2, y2), 0
  354.                 s = s + .01
  355.                 Display
  356.             Loop
  357.             Delay .2
  358.             AutoDisplay
  359.  
  360.         Case 6 ' new photo is zoomed from middle the screen as rectangle with this image
  361.  
  362.             Stp = Width / 100
  363.             Stp2 = Height / 100
  364.             x1 = centerX + Sin(3.925) * k
  365.             Do Until x1 <= 0
  366.                 x1 = centerX + Sin(3.925) * k
  367.                 y1 = centerY + Cos(3.925) * k2
  368.                 x3 = centerX + Sin(0.785) * k
  369.                 y3 = centerY + Cos(0.785) * k2
  370.                 PutImage (x1, y1)-(x3, y3), New, 0
  371.                 k = k + Stp
  372.                 k2 = k2 + Stp2
  373.                 kk = kk + 1
  374.                 Delay .01
  375.             Loop
  376.  
  377.         Case 7 'new photo is inserted as rectnagles from left to right and from ceiling to bottom
  378.  
  379.             sx = Width / 10
  380.             sy = Height / 10
  381.             For y = 0 To Height Step sy
  382.                 For x = 0 To Width Step sx
  383.                     PutImage (x, y), New, 0, (x, y)-(x + sx, y + sy)
  384.                     Delay .02
  385.             Next x, y
  386.  
  387.         Case 8 'vice versa as Case 7
  388.  
  389.             sx = Width / 10
  390.             sy = Height / 10
  391.  
  392.             For x = 0 To Width Step sx
  393.                 For y = 0 To Height Step sy
  394.                     PutImage (x, y), New, 0, (x, y)-(x + sx, y + sy)
  395.                     Delay .02
  396.             Next y, x
  397.  
  398.         Case 9 'photo is displayed using quarter circle effect
  399.             c = _Pi / 2
  400.             Do Until s > _Pi(2) / 4
  401.                 x1 = centerX + Cos(s) * Width
  402.                 y1 = centerY + Sin(s) * Width
  403.                 x2 = centerX + Cos(s + .01) * Width
  404.                 y2 = centerY + Sin(s + .01) * Width
  405.  
  406.                 x3 = centerX + Cos(s + c) * Width
  407.                 y3 = centerY + Sin(s + c) * Width
  408.                 x4 = centerX + Cos(s + .01 + c) * Width
  409.                 y4 = centerY + Sin(s + .01 + c) * Width
  410.  
  411.                 x5 = centerX + Cos(s + 2 * c) * Width
  412.                 y5 = centerY + Sin(s + 2 * c) * Width
  413.                 x6 = centerX + Cos(s + .01 + 2 * c) * Width
  414.                 y6 = centerY + Sin(s + .01 + 2 * c) * Width
  415.  
  416.                 x7 = centerX + Cos(s + 3 * c) * Width
  417.                 y7 = centerY + Sin(s + 3 * c) * Width
  418.                 x8 = centerX + Cos(s + .01 + 3 * c) * Width
  419.                 y8 = centerY + Sin(s + .01 + 3 * c) * Width
  420.  
  421.  
  422.                 MapTriangle (centerX, centerY)-(x1, y1)-(x2, y2), New To(centerX, centerY)-(x1, y1)-(x2, y2), 0
  423.                 MapTriangle (centerX, centerY)-(x3, y3)-(x4, y4), New To(centerX, centerY)-(x3, y3)-(x4, y4), 0
  424.                 MapTriangle (centerX, centerY)-(x5, y5)-(x6, y6), New To(centerX, centerY)-(x5, y5)-(x6, y6), 0
  425.                 MapTriangle (centerX, centerY)-(x7, y7)-(x8, y8), New To(centerX, centerY)-(x7, y7)-(x8, y8), 0
  426.  
  427.                 s = s + .01
  428.                 Display
  429.                 Delay .01
  430.             Loop
  431.             Delay .2
  432.             AutoDisplay
  433.  
  434.         Case 10 'The image is divided into stripes in the Y axis, odd go to the right, even go to the left. So the old one is comming out and a new image arrives at the screen.
  435.             ReDim Ys(1 To 10) As Integer
  436.             ReDim Xs(1 To 10) As Integer
  437.             d = Height / 10
  438.             XSpd = Width / 100 'shift speed in X axis is WIDTH/100 pixels per loop
  439.             For Yf = 1 To 10
  440.                 Ys(Yf) = (Yf - 1) * d
  441.             Next
  442.             PCopy 0, 1
  443.             Do Until done >= Width
  444.                 PCopy 1, 0
  445.                 For s = 1 To 10
  446.                     If s Mod 2 = 0 Then
  447.                         Xs(s) = Xs(s) - XSpd
  448.                         PutImage (Xs(s), Ys(s)), Old, 0, (0, Ys(s))-(Width, Ys(s) + d)
  449.                         PutImage (Xs(s) + Width, Ys(s)), New, 0, (0, Ys(s))-(Width, Ys(s) + d)
  450.                     Else
  451.                         Xs(s) = Xs(s) + XSpd
  452.                         PutImage (Xs(s), Ys(s)), Old, 0, (0, Ys(s))-(Width, Ys(s) + d)
  453.                         PutImage (Xs(s) - Width, Ys(s)), New, 0, (0, Ys(s))-(Width, Ys(s) + d)
  454.                     End If
  455.                 Next s
  456.                 done = done + XSpd
  457.                 Display
  458.                 Delay .01
  459.             Loop
  460.             Delay .02
  461.             AutoDisplay
  462.  
  463.         Case 11 'vice versa as Case 10
  464.             ReDim Ys(1 To 10) As Integer
  465.             ReDim Xs(1 To 10) As Integer
  466.             d = Height / 10
  467.             XSpd = Width / 100 'shift speed in X axis is WIDTH/100 pixels per loop
  468.             For Yf = 1 To 10
  469.                 Ys(Yf) = (Yf - 1) * d
  470.             Next
  471.             PCopy 0, 1
  472.             Do Until done >= Width
  473.                 PCopy 1, 0
  474.                 For s = 1 To 10
  475.                     If s Mod 2 = 0 Then
  476.                         Xs(s) = Xs(s) + XSpd
  477.                         PutImage (Xs(s), Ys(s)), Old, 0, (0, Ys(s))-(Width, Ys(s) + d)
  478.                         PutImage (Xs(s) - Width, Ys(s)), New, 0, (0, Ys(s))-(Width, Ys(s) + d)
  479.                     Else
  480.                         Xs(s) = Xs(s) - XSpd
  481.                         PutImage (Xs(s), Ys(s)), Old, 0, (0, Ys(s))-(Width, Ys(s) + d)
  482.                         PutImage (Xs(s) + Width, Ys(s)), New, 0, (0, Ys(s))-(Width, Ys(s) + d)
  483.                     End If
  484.                 Next s
  485.                 done = done + XSpd
  486.                 Display
  487.                 Delay .01
  488.             Loop
  489.             Delay .02
  490.             AutoDisplay
  491.     End Select
  492.     FreeImage Old
  493.     FreeImage New
  494.  
  495. Sub PlayVideo (Video As String)
  496.     'is my work for next weekend...
  497.  
  498.  
  499.  
  500. Sub GetImageRatio (LeftUpperX, LeftUpperY, RightDownX, RightDownY, handle)
  501.     W = Width(Images(handle))
  502.     H = Height(Images(handle))
  503.     sW = Width '                    Screen Width
  504.     sH = Height '                   Screen Height
  505.  
  506.     RatioX = sW / W
  507.     RatioY = sH / H
  508.  
  509.     Ratio = 1 '                     if RatioX = RatioY
  510.     If RatioX < RatioY Then Ratio = RatioX
  511.     If RatioY < RatioX Then Ratio = RatioY
  512.  
  513.     N_I_W = W * Ratio '             New _ Image _ Width
  514.     N_I_H = H * Ratio '             New _ Image _ Height
  515.  
  516.     LeftUpperX = (sW - N_I_W) \ 2
  517.     RightDownX = sW - LeftUpperX
  518.     LeftUpperY = (sH - N_I_H) \ 2
  519.     RightDownY = sH - LeftUpperY
  520.  

Edit: After creating window press any key to start, i forgot DELA statement in script file (is used before screen recording)
* Ele.zip (Filesize: 3.11 MB, Downloads: 243)
« Last Edit: February 07, 2022, 11:06:19 am by Petr »