المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : مساعده في كتابه كود علي زر


حمووده
03-01-2013, 07:44 PM
بسم الله الرحمن الرحيم


هذا هو كود لتحديد والغاء تحديد ال sheck box
bChecked = CheckBox.GetChecked(this);
if bChecked==true then
CheckBox.SetText(this, "إلغاء تحديد الكل");
for i=1, 12 do
CheckBox.SetChecked("CheckBox"..i, true);
end
else
CheckBox.SetText(this, "تحديد الكل");
for i=1, 12 do
CheckBox.SetChecked("CheckBox"..i, false);
end
end


اريد نفس الكود ولاكن علي زر

النصل القاطع
04-01-2013, 04:02 PM
إستبدل كلمة this
بالإسم الحقيقى للشيك بوكس
ضع الإسكربت فى الحدث onclick للزر

حمووده
04-01-2013, 05:11 PM
إستبدل كلمة this
بالإسم الحقيقى للشيك بوكس
ضع الإسكربت فى الحدث onclick للزر

ارجو منك كتابه الكود لاني اريد من الزر تحديد مجموعه وليس واحد فقط من السيك بوكس

عبود عبود
04-01-2013, 05:43 PM
هل يمكن وضع ملف مفتوح لإجراء التعديلات المناسبة لة ؟

سامى ابوسريع
06-01-2013, 08:06 PM
هذا كود موجود عندى ولا اعلم هل هذا ما قصدته أم لا

تثبيت المحدد

Button.SetText("time", "00 : 00");
i=0;
j=0;

confirmation1 = Dialog.Message("Basim Magdy", "هل أنت متأكد من تثبيت كل البرامج ؟", MB_YESNO, MB_ICONQUESTION, MB_DEFBUTTON1);
if confirmation1 == 6 then

x01 = CheckBox.GetChecked("Box01");
x02 = CheckBox.GetChecked("Box02");
x03 = CheckBox.GetChecked("Box03");
x04 = CheckBox.GetChecked("Box04");
x05 = CheckBox.GetChecked("Box05");

تثبيت الكل


i=0;
j=0;


confirmation1 = Dialog.Message("Basim Magdy", "هل أنت متأكد من تثبيت كل البرامج ؟", MB_YESNO, MB_ICONQUESTION, MB_DEFBUTTON1);
if confirmation1 == 6 then
Dialog.TimedMessage("Please Wait...", "فضلا إنتظر قليلا .. جاري البدء في التثبيت", 3000, MB_ICONNONE);
Progress.SetVisible("Progress1", true);
Button.SetVisible("status", true);
Button.SetEnabled("Button1", true);



CheckBox.SetChecked("Box01", true);
CheckBox.SetChecked("Box02", true);
CheckBox.SetChecked("Box03", true);
CheckBox.SetChecked("Box04", true);
CheckBox.SetChecked("Box05", true);
CheckBox.SetChecked("Box06", true);
CheckBox.SetChecked("Box07", true);
CheckBox.SetChecked("Box08", true);
CheckBox.SetChecked("Box09", true);
CheckBox.SetChecked("Box010", true);
CheckBox.SetChecked("Box011", true);
CheckBox.SetChecked("Box012", true);
CheckBox.SetChecked("Box013", true);
CheckBox.SetChecked("Box014", true);
CheckBox.SetChecked("Box015", true);
CheckBox.SetChecked("Box016", true);
CheckBox.SetChecked("Box017", true);
CheckBox.SetChecked("Box018", true);
CheckBox.SetChecked("Box019", true);
CheckBox.SetChecked("Box020", true);
CheckBox.SetChecked("Box021", true);
CheckBox.SetChecked("Box022", true);
CheckBox.SetChecked("Box023", true);
CheckBox.SetChecked("Box024", false);

---------------------------------------

Label.SetText("c1", "1");

Button.SetText("status", "Adobe Reader 10");
result = File.Run("AutoPlay\\Docs\\Adobe Reader 10 Ar.exe", "", "", SW_SHOWNORMAL, true);

Button.SetText("status", "K-Lite Codec");
result = File.Run("AutoPlay\\Docs\\K-Lite Codec Pack960.exe", "", "", SW_SHOWNORMAL, true);

Button.SetText("status", "office 2003");
result = File.Run("AutoPlay\\Docs\\office 2003.exe", "", "", SW_SHOWNORMAL, true);

Button.SetText("status", "C Cleaner");
result = File.Run("AutoPlay\\Docs\\CCleaner.exe", "", "", SW_SHOWNORMAL, true);

Button.SetText("status", "Media Player 11");
result = File.Run("AutoPlay\\Docs\\media11.exe", "", "", SW_SHOWNORMAL, true);

Button.SetText("status", "Win amp");
result = File.Run("AutoPlay\\Docs\\winamp563_full.exe", "", "", SW_SHOWNORMAL, true);

Button.SetText("status", "Wafi Translator");
result = File.Run("AutoPlay\\Docs\\Golden Al-Wafi Translator.exe", "", "", SW_SHOWNORMAL, true);

Button.SetText("status", "Net Frame Work 3.5");
result = File.Run("AutoPlay\\Docs\\nfw3.5.exe", "", "", SW_SHOWNORMAL, true);

Button.SetText("status", "Win Rar");
result = File.Run("AutoPlay\\Docs\\WinRar4.20.exe", "", "", SW_SHOWNORMAL, true);

Button.SetText("status", "Flash Player");
result = File.Run("AutoPlay\\Docs\\Adobe® Flash® Player.exe", "", "", SW_SHOWNORMAL, true);

Button.SetText("status", "Internet Download Manager");
result = File.Run("AutoPlay\\Docs\\IDM-6.14.exe", "", "", SW_SHOWNORMAL, true);

Button.SetText("status", "Fire fox");
result = File.Run("AutoPlay\\Docs\\Firefox.exe", "", "", SW_SHOWNORMAL, true);

Button.SetText("status", "Skype");
result = File.Run("AutoPlay\\Docs\\SkypeFull.exe", "", "", SW_SHOWNORMAL, true);

Button.SetText("status", "Google Chrome");
result = File.Run("AutoPlay\\Docs\\GoogleChrome21.exe", "", "", SW_SHOWNORMAL, true);

Button.SetText("status", "Yahoo! Messenger");
result = File.Run("AutoPlay\\Docs\\Yahoo 11.exe", "", "", SW_SHOWNORMAL, true);

Button.SetText("status", "????? ??????? ?????");
result = File.Run("AutoPlay\\Docs\\Arabic Windows.exe", "", "", SW_SHOWNORMAL, true);

Button.SetText("status", "Super Copier");
result = File.Run("AutoPlay\\Docs\\SuperCopier.exe", "", "", SW_SHOWNORMAL, true);

Button.SetText("status", "Format Factory");
result = File.Run("AutoPlay\\Docs\\Format Factory 3.exe", "", "", SW_SHOWNORMAL, true);

Button.SetText("status", "Ultra ISO");
result = File.Run("AutoPlay\\Docs\\UltraISO9.exe", "", "", SW_SHOWNORMAL, true);

Button.SetText("status", "Nero 8");
result = File.Run("AutoPlay\\Docs\\Nero 8 Express .exe", "", "", SW_SHOWNORMAL, true);

Button.SetText("status", "????? ???? ???? ????");
result = File.Run("AutoPlay\\Docs\\ze allah.exe", "", "", SW_SHOWNORMAL, true);

Button.SetText("status", "anti autorun");
result = File.Run("AutoPlay\\Docs\\antiautorun.exe", "", "", SW_SHOWNORMAL, true);

Button.SetText("status", "avast");
result = File.Run("AutoPlay\\Docs\\avast_7.exe", "", "", SW_SHOWNORMAL, true);

Button.SetText("status", "Avira Internet Security");
result = File.Run("AutoPlay\\Docs\\Avira Internet Security.exe", "", "", SW_SHOWNORMAL, true);


Label.SetText("c1", "0");


-------------------------------------------------


Progress.SetVisible("Progress1", false);
Button.SetVisible("status", false);


Audio.Load(CHANNEL_NARRATION, "AutoPlay\\Audio\\1 (41).wav", true, false);
----------------------------------------


confirmation2 = Dialog.Message("Basim Magdy", " تم تثبيت البرامج بنجاح\r\n يرجى إعادة تشغيل الكمبيوتر\r\nهل تريد إعادة تشغيل الكمبيوتر الآن ؟", MB_YESNO, MB_ICONNONE, MB_DEFBUTTON1);
if confirmation2 == 6 then
System.Reboot();
Application.Exit(0);
else
-- The yes button was NOT pressed, do NOT allow the program to close (Return false)
return false;
end
else
-- The yes button was NOT pressed, do NOT allow the program to close (Return false)
return false;
end

تحديد الكل

Button.SetEnabled("Button1", true);


CheckBox.SetChecked("Box01", true);
CheckBox.SetChecked("Box02", true);
CheckBox.SetChecked("Box03", true);
CheckBox.SetChecked("Box04", true);


عدم تحديد الكل

Button.SetEnabled("Button1", false);


CheckBox.SetChecked("Box01", false);
CheckBox.SetChecked("Box02", false);
CheckBox.SetChecked("Box03", false);
CheckBox.SetChecked("Box04", false);

حمووده
07-01-2013, 06:05 AM
يا اخواني الموضوع مش محتاج ملف مفتوح كل الي محتاجه زر يقوم بتحديد والعاء تحديد مجموعه CheckBox

سامى ابوسريع
07-01-2013, 06:56 AM
تحديد الكل

Button.SetEnabled("Button1", true);


CheckBox.SetChecked("Box01", true);
CheckBox.SetChecked("Box02", true);
CheckBox.SetChecked("Box03", true);
CheckBox.SetChecked("Box04", true);


عدم تحديد الكل

Button.SetEnabled("Button1", false);


CheckBox.SetChecked("Box01", false);
CheckBox.SetChecked("Box02", false);
CheckBox.SetChecked("Box03", false);
CheckBox.SetChecked("Box04", false);[/QUOTE]

الا يكفيك هذا ايها الطيب؟ واحد للتحديد والاخر لالغاء التحديد

حمووده
08-01-2013, 07:06 AM
هذا هو الكود لوضع الذي يوضع علي الزر للتحديد والغاء تححديد الشيك بوكس

---seleccionar o deselecciona
c1 = CheckBox.GetChecked("CheckBox1")
c2 = CheckBox.GetChecked("CheckBox2")
c3 = CheckBox.GetChecked("CheckBox3")
c4 = CheckBox.GetChecked("CheckBox4")

if(c1==false or c2==false or c3==false or c4==false) then
CheckBox.SetChecked("CheckBox1", true)
CheckBox.SetChecked("CheckBox2", true)
CheckBox.SetChecked("CheckBox3", true)
CheckBox.SetChecked("CheckBox4", true)
else
CheckBox.SetChecked("CheckBox1", false)
CheckBox.SetChecked("CheckBox2", false)
CheckBox.SetChecked("CheckBox3", false)
CheckBox.SetChecked("CheckBox4", false)
end
يغلق