Jump to content

MahmoudBasem

Members
  • Posts

    7
  • Joined

  • Last visited

Everything posted by MahmoudBasem

  1. "Hello, can you create a script and customize it to work on a specific device or certain specified devices, and if the script is opened from other devices, it won't work? If possible, how can this be done? Thanks in advance."
  2. function help_menu_1() selectedOption = #Urls_name -- رقم الموقع لاختيار "رجوع" codes1 = gg.choice(Urls_name, nil) if codes1==nil then ex(11) end if codes1 == selectedOption then HOME9() -- استدعاء الوظيفة للرجوع إلى القائمة السابقة else -- استمرار تنفيذ الخيار المحدد local selectedUrl = urls1[codes1] local selectedName = names[codes1] Time = os.clock() getalldata = (gg.makeRequest(selectedUrl).content) if getalldata == nil then gg.toast("No Internet Connection to download the file. Allow Internet Access to continue") ex(11) else file = io.open(DownloadPath .. selectedName, "w") file:write(getalldata) io.close(file) gg.toast("Dᴏᴡɴʟᴏᴀᴅ Sᴜᴄᴄᴇss") gg.sleep(2500) gg.toast("Dᴏᴡɴʟᴏᴀᴅ Pᴀᴛʜ :" .. DownloadPath) gg.sleep(2500) gg.toast("Fɪʟᴇ Dᴏᴡɴʟᴏᴀᴅ Tɪᴍᴇ :" .. string.format("%.2f", os.clock() - Time) .. " Sᴇᴄᴏɴᴅs") gg.sleep(2500) gg.alert(""..DownloadPath.."\n"..selectedName.."") end end ex(11) end It didn't work the way I wanted. When I go back and choose another option, a message appears about the lack of internet connection. Please watch the attached video to see what I mean. Thanks in advance, my friend. Screenrecorder-2023-09-25-22-31-05-805_0_COMPRESSED.mp4
  3. I want to create a tool or write code that automatically translates my file into multiple languages. Is this possible, and if so, how can I do it?
  4. In this code, when the user presses "Yes," it connects to the internet and downloads the file. However, when the user presses "No," it does not give an internet connection error. I want, when the user presses "No," to display a message informing them that the file is not allowed to connect to the internet to download the file and to open another file instead. How can I achieve this? The code: DownloadPath = gg.EXT_STORAGE .. "/Download/" urls={'https://d.apkpure.com/b/APK/com.king.candycrushsaga?version=latest', 'https://d.apkpure.com/b/APK/com.google.android.gm?version=latest', 'https://d.apkpure.com/b/APK/com.alphainventor.filemanager?version=latest', 'https://d.apkpure.com/b/APK/com.facebook.lite?version=latest'} names={'candy crush.apk','gmail.apk','file manager.apk','facebook lite.apk'} Urls_name = {'كاندي كراش','جيميل','مدير ملفات','فبسبوك لايت'} table.insert(Urls_name, 'رجوع') selectedOption = #Urls_name -- رقم الموقع لاختيار "رجوع" codes = gg.choice(Urls_name, nil) if codes1==nil then -- القايمة المراد فتحها مرة اخري end if codes1 == selectedOption then -- استدعاء الوظيفة للرجوع إلى القائمة السابقة else -- استمرار تنفيذ الخيار المحدد local selectedUrl = urls[codes] local selectedName = names[codes] Time = os.clock() getalldata = (gg.makeRequest(selectedUrl).content) file = io.open(DownloadPath .. selectedName, "w") file:write(getalldata) io.close(file) gg.toast("Dᴏᴡɴʟᴏᴀᴅ Sᴜᴄᴄᴇss") gg.sleep(2500) gg.toast("Dᴏᴡɴʟᴏᴀᴅ Pᴀᴛʜ :" .. DownloadPath) gg.sleep(2500) gg.toast("Fɪʟᴇ Dᴏᴡɴʟᴏᴀᴅ Tɪᴍᴇ :" .. string.format("%.2f", os.clock() - Time) .. " Sᴇᴄᴏɴᴅs") gg.sleep(2500) gg.alert(""..DownloadPath.."\n"..selectedName.."") end
  5. When I use this code in a Lua-supporting programming environment, it gives the correct result. However, when I use it in Game Guardian, it does not give the correct result and only provides an integer, not the fraction Where is the error? This is the code: -- هذا مثال تخيلي لحجم الملف بالبايت (عندما يتم تحميله) local downloadedFileSizeInBytes = 5780000 -- حجم الملف المنزل بالبايت (5.78 ميجابايت) -- حساب الحجم بالميجابايت والكسر المتبقي local fileSizeInMB = downloadedFileSizeInBytes / (1000 * 1000) local remainderInBytes = downloadedFileSizeInBytes % (1000 * 1000) -- تنسيق الحجم بالميجابايت والكسر للطباعة local formattedSize = string.format("%.2f MB", fileSizeInMB) print("File Size: " .. formattedSize)
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.