Skip to content

Commit 1f6455e

Browse files
authored
copy RBZ Content To Plugin Sketch up by Al3mer
copy RBZ Content To Plugin Sketch up put all files rbz next to this file and run this enjoy
0 parents  commit 1f6455e

File tree

1 file changed

+230
-0
lines changed

1 file changed

+230
-0
lines changed
Lines changed: 230 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,230 @@
1+
@echo off
2+
chcp 65001 >nul
3+
setlocal enabledelayedexpansion
4+
color 07
5+
title Extract Plugins by Al3mer
6+
mode con: cols=100 lines=50
7+
8+
REM Get the directory of the current script
9+
set "scriptDir=%~dp0"
10+
set "destinationDir=%scriptDir%Plugins"
11+
12+
REM Create the destination directory if it doesn't exist
13+
if not exist "%destinationDir%" mkdir "%destinationDir%"
14+
15+
REM Variables to hold file names and versions
16+
set "extractedFiles="
17+
set "failedFiles="
18+
set "extractedCount=0"
19+
set "failedCount=0"
20+
set "successfulPlugins="
21+
set "failedPlugins="
22+
23+
for %%f in (*.rbz) do (
24+
set "filename=%%~nf"
25+
set "newname=!filename: =_!"
26+
if "!filename!" NEQ "!newname!" ren "%%f" "!newname!.rbz"
27+
)
28+
29+
REM Extract Plugins
30+
echo.
31+
echo ====================================================
32+
echo Extract Plugins by Al3mer
33+
echo ====================================================
34+
echo.
35+
36+
for %%f in ("%scriptDir%*.rbz") do (
37+
echo Extracting %%f to %destinationDir%
38+
tar -xf "%%f" -C "%destinationDir%"
39+
if !errorlevel! equ 0 (
40+
set "extractedFiles=!extractedFiles! %%~nxf"
41+
set /a "extractedCount+=1"
42+
) else (
43+
set "failedFiles=!failedFiles! %%~nxf"
44+
set /a "failedCount+=1"
45+
)
46+
)
47+
48+
echo.
49+
echo ====================================================
50+
echo SketchUp Versions
51+
echo ====================================================
52+
echo.
53+
54+
set "versions="
55+
for /L %%v in (2018, 1, 2030) do (
56+
set "basePath=%APPDATA%\SketchUp\SketchUp %%v"
57+
if exist "!basePath!" (
58+
echo Installed SketchUp version: %%v
59+
set "versions=!versions! %%v"
60+
)
61+
)
62+
63+
REM Check for RBZ files
64+
if %extractedCount% equ 0 (
65+
echo No RBZ files found in the specified location.
66+
67+
REM Create vbscript for the no files found message
68+
(
69+
echo Set objShell = CreateObject("WScript.Shell"^)
70+
echo msg = "No RBZ files found in the specified location."
71+
echo objShell.Popup msg, 0, "Extraction Report", 48
72+
) > "%scriptDir%nofiles.vbs"
73+
74+
REM Run the vbscript
75+
cscript /nologo "%scriptDir%nofiles.vbs"
76+
77+
rmdir /S /Q "%destinationDir%"
78+
del "%scriptDir%nofiles.vbs"
79+
80+
)
81+
82+
REM Wait for 2 second before continuing
83+
timeout /t 2 /nobreak >nul
84+
85+
86+
REM Run the vbscript
87+
cscript /nologo "%scriptDir%sketchup_versions.vbs"
88+
89+
REM Copy Plugins to installed SketchUp versions
90+
for %%v in (%versions%) do (
91+
set "basePath=%APPDATA%\SketchUp\SketchUp %%v"
92+
xcopy /S /E /Y "%destinationDir%\*" "!basePath!\SketchUp\Plugins\" || (
93+
echo Error copying files to version %%v. Check permissions or destination folder.
94+
)
95+
)
96+
97+
REM Build list of successfully copied and failed plugins
98+
for %%f in (%extractedFiles%) do (
99+
if "%%~xf" equ ".rbz" (
100+
set "successfulPlugins=!successfulPlugins!%%~nf,"
101+
)
102+
)
103+
for %%f in (%failedFiles%) do (
104+
if "%%~xf" equ ".rbz" (
105+
set "failedPlugins=!failedPlugins!%%~nf^,"
106+
)
107+
)
108+
109+
REM Create HTML file for farewell message
110+
(
111+
echo ^<!DOCTYPE html^>
112+
echo ^<html lang="ar"^>
113+
echo ^<head^>
114+
echo ^<meta charset="UTF-8"^>
115+
echo ^<meta name="viewport" content="width=device-width, initial-scale=1.0"^>
116+
echo ^<title^>Farewell Message^</title^>
117+
echo ^<style^>
118+
echo body {
119+
echo font-family: Arial, sans-serif;
120+
echo text-align: center;
121+
echo margin: 20px;
122+
echo }
123+
echo .big-text {
124+
echo font-size: 24px;
125+
echo font-weight: bold;
126+
echo margin-bottom: 20px;
127+
echo }
128+
echo .list {
129+
echo text-align: left;
130+
echo margin: 20px auto;
131+
echo width: 50%%;
132+
echo }
133+
echo table {
134+
echo width: 30%%;
135+
echo margin: 10px auto;
136+
echo border-collapse: collapse;
137+
echo }
138+
echo th, td {
139+
echo border: 3px solid black;
140+
echo padding: 11px;
141+
echo text-align: center;
142+
echo }
143+
echo ^</style^>
144+
echo ^</head^>
145+
echo ^<body^>
146+
echo ^<div class="big-text"^>Installation completed successfully.^</div^>
147+
echo ^<div class="big-text"^>Automatic copying of additions has been completed.^</div^>
148+
echo ^<div class="big-text"^>With the help of artificial intelligence chatgpt - gemeni.^</div^>
149+
150+
echo ^<hr^>
151+
152+
echo ^<div class="big-text"^>تم التثبيت بنجاح.^</div^>
153+
echo ^<div class="big-text"^>تمت عملية النسخ التلقائي للاضافات .^</div^>
154+
echo ^<div class="big-text"^>بمساعدة الذكاء الاصطناعي chatgpt -gemeni.^</div^>
155+
echo ^<hr^>
156+
157+
echo ^<h2^>New components have been successfully ^<br^> added to SketchUp "%versions%" ^</h2^>
158+
echo ^<hr^>
159+
160+
REM Count the number of successfully copied plugins
161+
set "successfulCount=0"
162+
for %%f in (!successfulPlugins!) do (
163+
set /A successfulCount+=1
164+
)
165+
166+
REM Count the number of plugins that failed to copy
167+
set "failedCount=0"
168+
for %%f in (!failedPlugins!) do (
169+
set /A failedCount+=1
170+
)
171+
172+
echo ^<div class="list"^>
173+
echo ^<h3^>Successfully copied plugins:= { !successfulCount^! } ^</h3^>
174+
echo ^<ul^>
175+
REM List of successfully copied plugins
176+
for %%f in (!successfulPlugins!) do (
177+
echo ^<li^>%%f^</li^>
178+
)
179+
echo ^</ul^>
180+
echo ^</div^>
181+
182+
echo ^<div class="list"^>
183+
echo ^<h3^>Failed to copy plugins:= { ^!failedCount^! } ^</h3^>
184+
echo ^<ul^>
185+
REM List of plugins that failed to copy
186+
for %%f in (!failedPlugins!) do (
187+
echo ^<li^>%%f^</li^>
188+
)
189+
echo ^</ul^>
190+
echo ^</div^>
191+
192+
echo ^<hr^>
193+
echo ^<table^>
194+
echo ^<tr^>
195+
echo ^<td^>^<b^>Archt/ Amer Al-hlhli^</b^>^</td^>
196+
echo ^<td^>^<b^>م/ عامر الحلحلي^</b^>^</td^>
197+
echo ^</tr^>
198+
echo ^<tr^>
199+
echo ^<td^>^<a href="https://t.me/pro3mer"^>Engineering programs^</a^>^</td^>
200+
echo ^<td^>^<a href="https://t.me/pro3mer"^>برامج هندسية^</a^>^</td^>
201+
echo ^</tr^>
202+
echo ^<tr^>
203+
echo ^<td^>^<a href="https://t.me/apk3mer"^>Activated Android applications^</a^>^</td^>
204+
echo ^<td^>^<a href="https://t.me/apk3mer"^>تطبيقات اندرويد مفعلة^</a^>^</td^>
205+
echo ^</tr^>
206+
echo ^<tr^>
207+
echo ^<td^>^<a href="https://t.me/ppt3mer"^>Distinctive PowerPoint files^</a^>^</td^>
208+
echo ^<td^>^<a href="https://t.me/ppt3mer"^>ملفات باوربوينت مميزة^</a^>^</td^>
209+
echo ^</tr^>
210+
echo ^<tr^>
211+
echo ^<td^>^<a href="https://www.youtube.com/@hlhli?sub_confirmation=1"^>YouTube channel^</a^>^</td^>
212+
echo ^<td^>^<a href="https://www.youtube.com/@hlhli?sub_confirmation=1"^>قناة اليوتيوب^</a^>^</td^>
213+
echo ^</tr^>
214+
echo ^</table^>
215+
echo ^</body^>
216+
echo ^</html^>
217+
) > "%scriptDir%farewell_message.html"
218+
219+
REM Open HTML file in default browser
220+
start "" "%scriptDir%farewell_message.html"
221+
222+
REM Delete the destination directory and all its contents (/S: include all subdirectories and files)
223+
rmdir /S /Q "%destinationDir%"
224+
225+
REM Delete the vbscript files
226+
del "%scriptDir%sketchup_versions.vbs"
227+
228+
REM Wait for 1 second before exiting
229+
timeout /t 1 /nobreak >nul
230+
exit

0 commit comments

Comments
 (0)